DATA GRID sorting problem.
-
My requirement is, i added 50 empty rows to the Data grid. One of the columns of the datagrid is of ComboBoxColumnStyle. Now after filling data into just two rows (remember i have 50 empty rows), when i click on column header of ComboBoxColumnStyle columns it is sorting the total 50 rows, but i want to ignore the empty rows (other 48 rows). Because if i don't ignore the empty rows and sort the rows with data are being moved to end of the grid, leaving all above rows empty. Any ideas, how to sort rows only with data? Thanks kumar
-
My requirement is, i added 50 empty rows to the Data grid. One of the columns of the datagrid is of ComboBoxColumnStyle. Now after filling data into just two rows (remember i have 50 empty rows), when i click on column header of ComboBoxColumnStyle columns it is sorting the total 50 rows, but i want to ignore the empty rows (other 48 rows). Because if i don't ignore the empty rows and sort the rows with data are being moved to end of the grid, leaving all above rows empty. Any ideas, how to sort rows only with data? Thanks kumar
Hi, You can set the "SortMode" properties for the column as "Programatic". In this case you can control the time when you want the sorting to take place.
Manoj Never Gives up
-
My requirement is, i added 50 empty rows to the Data grid. One of the columns of the datagrid is of ComboBoxColumnStyle. Now after filling data into just two rows (remember i have 50 empty rows), when i click on column header of ComboBoxColumnStyle columns it is sorting the total 50 rows, but i want to ignore the empty rows (other 48 rows). Because if i don't ignore the empty rows and sort the rows with data are being moved to end of the grid, leaving all above rows empty. Any ideas, how to sort rows only with data? Thanks kumar
its simple write one for loop for geeting all the data from datagrid and check within for loop the data is available or not .if the data is available sort the data.
-
its simple write one for loop for geeting all the data from datagrid and check within for loop the data is available or not .if the data is available sort the data.