I have a databound grid that stores cell styles and row styles in a hashtable. The cell styles are used to populate an unbound column in the grid. When I sort this databound grid, it messes the relationship between rowstyles in the hash table and the grid. Does grid has any mapping mechanism that could be used to recreate this hash table?
Thanks in advance
ADAdministrator Syncfusion Team October 16, 2003 03:28 PM
There is no mapping maintained by the grid. The sorting is being done via the IBindingList sort support for the datasource.
You should use the primary key for the row as the key for the hashtable storing the style values. This way, when you want to get a particular style on any given row, you retrieve the primary key for that row, and then use that key to look up the style in your hashtable. Even if the grid is sorted or filtered, the primary key value for the row will be able to retrieve the proper value from the hashtable.