It appear values set in the InitializeRow event during postback are not reflected on the client.
We have grid bound to an object datasource and some of the boolean columns are show with images. We have implemented this by setting the CssClass in the initialize row event. like this:
{
it.CssClass = u.IsOnline ?
"tdImgOK" : "" ;
it.Text =
"";
it = e.Row.Items[4];
// IsApproved
it.CssClass = u.IsApproved ?
"tdImgOK" : "tdImgStop";
... etc.
We use a webdialog to edit a row, when the user click OK, the row is updated via
grid.get_behaviors().get_editingCore().commit();
The update works fine but our images are no longer displayed but instead the value of the cell, e.g. true/false.
If traced it down and although the InitializeRow event is fired, the updates are never reflected on the client. I can change any columns value but nothing happens. I have tried with and without viewstate/dataviewstate enabled but this makes no difference.
How can I solve this problem ?
Lex
Hello Lex,
I saw in the sample project that you have attached to one of your support tickets that you are taking the values of the cells using the method get_value(). This returns that value that is associated with the cell from the underlying datasource. Would you try using get_text(), this will take what you see.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Lyuba,
I am not sure I understand what you mean. The get_value is used to get the data from the grid to a webdialog, after the users edits it, set_value is used to set the values back in the grid, then commit is called to cause the update. I don't see where to change get_value into get_text. The problem happens after the postback.