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

how to freeze a row in the GridControl

I am implementing the Filter feature using the combo cell types. So, i have a grid and the top row I want to have only combo boxes where user can pick an item to filter the data in the grid. grdWorkflows[1, 1].CellType = "ComboBox"; grdWorkflows[1, 1].ChoiceList = GetNames(); grdWorkflows[1, 1].CellValue = DEFAULT_FILTER_STRING; grdWorkflows[1, 1].ReadOnly = false; grdWorkflows[1, 1].DropDownStyle = GridDropDownStyle.Exclusive; It works fine.. but when I do a Sort, this row also get sorted. Is there a way I can freeze/fix this specific row, so that only the remaining rows will get rearranged when sorted?

2 Replies

TJ Tony John July 23, 2004 11:55 AM

I just wanted to add to the above message that I am creating a header row to host my Filter comboboxes. When i sort, the header row remains there, but the combo boxes move to other rows based on the sort and other values get moved to this header row. What I need is, when I sort, the header rows should stay fixed with the combo boxes in it. is there any way I can fix a row even when sorted?


AD Administrator Syncfusion Team July 23, 2004 03:18 PM

How are you sorting things? Are you calling gridControl1.Data.SortByColumn to sort? If so, then there is an overload of that method that allows you to sepecify extra headers. Setting this parameter to 1 should allow the sort to ignore the 1st extra row. Are you setting grid.Rows.HeaderCount = 1 and grid.Rows.FrozenCount = 1 to freeze the extra rows from scrolling and make it look like a header (if you want that)?

Loader.
Live Chat Icon For mobile
Up arrow icon