|
Rank: Advanced Member Groups: Member
Joined: 5/15/2009 Posts: 33
|
Hi,
How could I do something like this with your grid?
<eo:StaticColumn DataField="DatetimeStamp" DataFormat='<%# ByteToString(Container.DataItem("DatetimeStamp")) %>' HeaderText="" Visible="true"> </eo:StaticColumn>
I get this error message Databinding expressions are only supported on objects that have a DataBinding event. EO.Web.StaticColumn does not have a DataBinding event.
I would like to format this at runtime...
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Your data is bind to grid row, not grid column. So obviously the column object will not allow binding expression.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2009 Posts: 33
|
Maybe my question was formulated wrong. So what would be the equivalent of:
<asp:TemplateField HeaderText="Travel Hours"> <HeaderStyle HorizontalAlign="Center" Wrap="True" /> <ItemStyle HorizontalAlign="Right" /> <ItemTemplate> <asp:Label runat="server" Text='<%# FormatMyDate(DataBinder.Eval(Container.DataItem, "BusinessTravelHours"),"d") %>' id="Label1"></asp:Label> </ItemTemplate> </asp:TemplateField>
How would you accomplish this with the Grid - Excel style? All I'm trying to do is format the data before loading.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will just use a DateTimeColumn and set the column's DataField to "BusinessTravelHours". There is no direct equivalent of server templates in our Grid because the Grid needs to dynamically format cell text on the client side.
Thanks
|
|