Hi ,
I am using infragistics grid and I wanted to know how I can use Eval in the Ultra web grid.
Thanks in advance
Hello,
Thanks for writing. Sure you can use Eval, you just need to make sure you are using templates (Templated Grid Column). Then, in the CellTemplate you can use Eval and map any data from the datasource to your HTML representation.
Example:
<ig:UltraWebGrid ID="UltraWebGrid1" runat="server" DataSourceID="xmlDSAnimals" Height="200px" Width="325px"> <Bands> <ig:UltraGridBand AddButtonCaption="Animal" BaseTableName="Animal" Key="Animal"> <Columns> <ig:TemplatedColumn IsBound="True" BaseColumnName="Name" Key="Name"> <Header Caption="Name" /> <CellTemplate> <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name", "Your name: {0}") %>'></asp:Label> </CellTemplate> </ig:TemplatedColumn> </Columns> </ig:UltraGridBand> </Bands> </ig:UltraWebGrid>