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,
What I meant, is that when you populate the dialog that you show, you take the values with get_value(), and not with get_text, and it doesn't show the value that you set in initializerow.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
It would be easier to investigate your issue, if I have a sample that illkustrates it. I will create a support ticket on your behalf, would you please attach a sample there.
Hi Lyuba,
This is what happens, the grid display normal, the Online/Approved/Locked colums are databound colums which have a CssClass set to show the image, they also have the text set to blank in the row initialize:
after editing via webdialog and submitting, I get the below result. The correct image is shown but that is because I have added some clientsite javascript. Without it even the image would not be updated.
I really can't believe its so difficult to get a simple image column working. I will try to provide a sample via the support case.
Rgds
Hey guys,
It seems like I'm having the same problem. On initialize row I'm setting the cssclass of a cell to change it's background color. Once I change the value of the cell in the grid and initiate a post back for Autocrud, it seems to ignore the Initialize row event. But if I initiate a second postback it seems to work. Why?
Still no response yet from Infragistics I see...
And still no response again
I too have the same proble. In initializeRow event I have included some Css. But after RowUpdating and PostBack the Css is not working.
Is the problem solved? After PostBack, InitializeRow 's CSS not working correctly...