Welcome Guest Search | Active Topics | Sign In | Register

ItemDataBound Options
gollnick
Posted: Thursday, November 13, 2014 6:48:24 AM
Rank: Member
Groups: Member

Joined: 11/13/2014
Posts: 15
Hello.. new to essential objects and your DataGrid control. Love it.. However... what is the equiviliant process of the Microsoft Grid Itemdatabound event?? I need to check some fields in the dataset while being bound in order to manipulate values.

thanks

gollnick
Code: Visual Basic.NET
eo_support
Posted: Thursday, November 13, 2014 11:17:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

There is no equivalent to that event. Our Grid is much more of a client side Grid than a server side grid. That means our Grid does most of the work on the client side without having to go back to the server side at all. For example, if you edit a row with MS Grid, it needs to go back to the server side in order to put a row into edit mode, then it needs to go back to the server side again when it exits edit mode and save the changes. For our Grid, you can edit as many rows/cells as you want without having to go back to the server side at all. The only trip back to the server is the last trip to submit and save all the changes. This reduces your server load and gives end user a much smoother user experience.

The draw back to this all client approach is, traditional server side event such as ItemDataBound does not exist for our Grid because our Grid doesn't go back to the server much at all. The closest you can get for our Grid is probably the column's DataFormat property. For example, if your data is an image Url and you want to display an image in the cell, you can set DataFormat to:

Code: HTML/ASPX
<img src="{0}" />


Then at runtime the Grid will replace "{0}" with the actual image Url and results in an image tag to be rendered in the Grid cell.

If you need to dynamically modify/populate the cell contents, you can also set the Grid cell's Value property directly. For example, an alternative way to achieve the above result without using DataFormat would be:

Code: C#
Grid1.Items[0].Cells[0].Value = "&lt;img src='{0}' /&gt;";


These together can help you achieve scenarios that are often achieved with ItemDataBound event for MS Grid.

Hope this helps. Please feel free to let us know if there is anything else.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.