P
Paul
I have a grind view which I bind to a dataset. I only show specific
columns from the dataset, but i need to reference the keyfield from
the DS to calculate the value of other fields. I have a custom field
which contains a label. Using the OnPreRender event, I need to access
the datasets keyfield - it needs to be passed into a function, which
returns a string which I need to assign to to the labels Text
attribute. I can currently do this with #EVAL but I want to know if
there is a simplier way? I'm currently assigning doing the following:
<ItemTemplate>
<asp:Label Text='<%# Eval("idMeeting") %>'
OnPreRender="lblReviewee_OnPreRender" runat="server" />
</ItemTemplate>
in the OnPreRender event, I assign the value to a string, then pass
this string into a function, assigning the output to the
((Label)sender).Text attribute.
THis seems a little convoluted. Is there a simpler way of doing this?
Any help would be appreciated.
columns from the dataset, but i need to reference the keyfield from
the DS to calculate the value of other fields. I have a custom field
which contains a label. Using the OnPreRender event, I need to access
the datasets keyfield - it needs to be passed into a function, which
returns a string which I need to assign to to the labels Text
attribute. I can currently do this with #EVAL but I want to know if
there is a simplier way? I'm currently assigning doing the following:
<ItemTemplate>
<asp:Label Text='<%# Eval("idMeeting") %>'
OnPreRender="lblReviewee_OnPreRender" runat="server" />
</ItemTemplate>
in the OnPreRender event, I assign the value to a string, then pass
this string into a function, assigning the output to the
((Label)sender).Text attribute.
THis seems a little convoluted. Is there a simpler way of doing this?
Any help would be appreciated.