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

sorting databoundgrid having unbound column

Hi, 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

1 Reply

AD Administrator Syncfusion Team October 16, 2003 07:28 PM UTC

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.

Live Chat Icon For mobile
Up arrow icon