I have a WebDataGrid with sorting enabled (on most columns) and paging enabled. There two editable columns and I have BatchUpdating enabled (AutoCRUD = false). In the InitializeRow event I set the Row.CssClass and if the data fits into a certain criteria it turns the text red. These rows happen to appear at the top of the grid when it first laods (due to custom business logic). When the grid is sorted the data sorts, but the red text remains on the first few rows. And when I page through the grid on every page the red text still appears at the top.
I also have 2 TemplateDataField columns that show different images based on the underlying data. In the InitializeRow event I set the Tooltip to each of the images. When I sort the grid the data sorts (with the images), but each Tooltip stays on the cell and doesn't sort. The same thing happens when I page through the grid. I only get the Tooltips from the first page set up correctly.
Has anyone else ran into this? The InitializeRow event is hit upon sort and paging so I know the code is running, but the grid doesn't seem to be responding.
Any help is much appreciated,
Karen
In doing some more research I found a couple of posts in the forums regarding client-side styling and found a workaround. I removed the logic from the InitializeRow event and added a ClientEvents-Initialize method. Here I set the cell styling and Tooltip based on certain pieces of data within the row. It's not ideal, but it works.
Does someone else has a better solution?
-Karen
Hello kgrise,
Your approach using ClientEvents-Initialize is correct. I am checking the progress of this.Do you need further assistance on this?
Thank you for posting in our community!