如题,
private DataGridTableStyle BuildDataGridTableStylePC() { DataGridTableStyle ts = new DataGridTableStyle(); ts.MappingName = "PrinterClient"; dataGridExPrinter.SingleSelection = true; dataGridExPrinter.AllowNavigation = false; ts.RowHeaderWidth = 1; ts.AllowSorting = true; DataGridColumnStyle TextCol; TextCol = new DataGridReadOnlyColumn(); TextCol.MappingName = "printer_id"; TextCol.Width = 120; TextCol.HeaderText = "打印机ID"; ts.GridColumnStyles.Add(TextCol); TextCol = new DataGridReadOnlyColumn(); TextCol.MappingName = "location"; TextCol.Width = 180; TextCol.HeaderText = "打印机位置"; ts.GridColumnStyles.Add(TextCol); TextCol = new DataGridReadOnlyColumn(); TextCol.MappingName = "description"; TextCol.Width = 150; TextCol.HeaderText = "打印机位置描述"; ts.GridColumnStyles.Add(TextCol); TextCol = new DataGridReadOnlyColumn(); TextCol.MappingName = "client_name"; TextCol.Width = 120; TextCol.HeaderText = "客户端机器名"; ts.GridColumnStyles.Add(TextCol); TextCol = new DataGridReadOnlyColumn(); TextCol.MappingName = "client_ip1"; TextCol.Width = 100; TextCol.HeaderText = "客户端IP"; ts.GridColumnStyles.Add(TextCol); TextCol = new DataGridReadOnlyColumn(); TextCol.MappingName = "pclocation"; TextCol.Width = 100; TextCol.HeaderText = "PC位置"; ts.GridColumnStyles.Add(TextCol); return ts; }
该调用的我都调用了,就是加载的时候不显示表头,在线求救还有哪不对的