We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

"GridListControl" HighLight color change,ColWidth Change,Hide Column

I have bounded a column with "GridListControl" control. 1) Now I need to change then HighLight color of GridListControl 2)want to change some columns ColWidth of the GridListControl. 3)In the query for the GridListControl there 3 columns, so it shows all the three columns. I need to Hide one Column. What to do?

1 Reply

AD Administrator Syncfusion Team December 21, 2004 09:48 AM UTC

If you only have one GridListControl column, then you can do set the properties at the bottom of Form.Load. If you have several such columns, then the properties will need to be set in CurrentCellShowingDropDown depending upon the CurrentCell.ColIndex. Here are the properties you need to set in Form.Load to do the things you asked about. GridDropDownGridListControlCellRenderer cr = this.gridDataBoundGrid1.CellRenderers["GridListControl"] as GridDropDownGridListControlCellRenderer; GridControl grid = cr.ListControlPart.Grid; // hide column 1 in grid - row header is column 0) grid.Cols.Hidden[1] = true; //size column 3 grid.ColWidths[3] = 150; //set teh selection color grid.AlphaBlendSelectionColor = Color.FromArgb(64, 255, 0, 0);

Live Chat Icon For mobile
Up arrow icon