Making the coloum header of datagridview read only
-
Hi, I have a datagridview control in which I populate data from a data table.When I click on the coloumn header of the gridview control,then the data which are displayed are sorted in the reverse order on which it was originally diaplayed. Issue:Now I want that the data should not be sorted when ever I click on any of the coloumn headers of the data gridview i.e I want all the coloumn headers of the gridview controls should be read only irrespective of clicking on it.When I will click on the gridview column header no actions should not be there in th gridview. Please help me out in this issue.Its very urgent. Thanks in advance.
Pradip Kishore
-
Hi, I have a datagridview control in which I populate data from a data table.When I click on the coloumn header of the gridview control,then the data which are displayed are sorted in the reverse order on which it was originally diaplayed. Issue:Now I want that the data should not be sorted when ever I click on any of the coloumn headers of the data gridview i.e I want all the coloumn headers of the gridview controls should be read only irrespective of clicking on it.When I will click on the gridview column header no actions should not be there in th gridview. Please help me out in this issue.Its very urgent. Thanks in advance.
Pradip Kishore
Hi Pradip Kishore Use DataGridView Properties Columns->; Selected Columns, (Select Column) and use Behavior: SortMode->;(Select your options) Notsortable
Franics K Antony
-
Hi Pradip Kishore Use DataGridView Properties Columns->; Selected Columns, (Select Column) and use Behavior: SortMode->;(Select your options) Notsortable
Franics K Antony
Hi Francis, Thanks a lot for the quick response. I have a requirement that when even I checked on certain data items in the gridview(GV) then the color must be changed (which i did),but now the problem is that when I click on any of the coloumn headers,the colors of the items which I had checked got vanished and the data is shown in the GV as fresh data as if no items have been checked. Please let me know how to prevent the color change when somebody clicks on any of the coloumn headers of the GV..? Thanks in advance.
Pradip Kishore