Hi,
I am currently switching from webgrid to webdatagrid and have quite some trouble finding myself around in the new object model. Using webdatagrid was quite straightforward since there was rows and columns and intuitive prop names. Not so anymore...
Anyway, after some fiddling around I finally found out how retrieve the row values server side, however, I am unsure of how I change them. For example, I wish to change the texts in the first column to links. How do I do that? I started with the OnInitializeRow event and got the first cell, but then I don't know what to do...
Hey John ,
I had a simillar situation while upgrading to the new webdatagrid. The way I worked around it was to create a template column that would call a public function on the server example:
Code on aspx page (as one of the columns in the grid control:
<ig:TemplateDataField Key="HomeTeam" Width="110px"> <ItemTemplate> <%#GetPredictionDisplay( DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "HomeTeamName") %></asp:Label> </ItemTemplate> <Header Text="Home Team" /></ig:TemplateDataField>
then the code in the function (.vb page) that returns the data:
Function GetPredictionDisplay(ByVal AdvancingTeamID As Object) as StringDim NewTextCell as string If AdvancingTeamID is DBNull.value Then NewTextCell="<span id='p" & counter "'> Data Value is NULL </span>" else NewTextCell="<span id='p" & counter "'> SELECTED TEAM</span>" end if
return NewTextCell
End function
I hope this helps you
Best,
DannyB