Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Need help with replacing UltraWebGrid with WebDataGrid.
posted

I'm new to using Infragistics Controls and right now I am trying to replace controls from v11.1 to v15.2. First thing I am trying to do is replace UltraWebGrid with updated WebDataGrid.

Below is what I have in aspx for UltrawWebGrid. I've been trying to search for alternate methods to replace DisplayLayout for example. Is there any documentation which lists equivalent methods and classes from 11.1 to 15.2?

Please help as I'm completely lost here!!!

<igtbl:UltraWebGrid ID="UltraWebGrid_Code_Table" runat="server" Width="746px" OnInitializeLayout="UltraWebGrid_Code_Table_InitializeLayout"
OnSelectedRowsChange="UltraWebGrid_Code_Table_SelectedRowsChange">
<DisplayLayout AllowDeleteDefault="Yes" CompactRendering="False" MergeStyles="True"
AutoGenerateColumns="True" AllowSortingDefault="OnClient" RowHeightDefault="20px"
Version="2.00" SelectTypeRowDefault="Single" ViewType="Hierarchical" HeaderClickActionDefault="SortMulti"
IndentationDefault="0" BorderCollapseDefault="Separate" Name="UltraWebGrid1"
TableLayout="Fixed" CellClickActionDefault="RowSelect" GroupByRowDescriptionMaskDefault="">
<HeaderStyleDefault TextOverflow="Ellipsis" VerticalAlign="Middle" Font-Size="11px"
Font-Names="Arial" Font-Bold="True" BorderColor="Transparent" Cursor="Hand" HorizontalAlign="Left"
ForeColor="Black" BackColor="LightGray" Height="20px">
<Padding Left="3px" Top="2px"></Padding>
<BorderDetails ColorTop="LightGray" WidthLeft="10px" ColorBottom="Transparent" WidthTop="0px"
ColorRight="White" WidthRight="0px" WidthBottom="0px" ColorLeft="LightGray"></BorderDetails>
</HeaderStyleDefault>
<RowSelectorStyleDefault Width="18px" ForeColor="Transparent" BackColor="White">
</RowSelectorStyleDefault>
<SelectedRowStyleDefault BackColor="Yellow" CssClass="TableData" Height="20px" BorderWidth="1px"
BorderStyle="NotSet" Cursor="hand">
<Padding Left="3px" Top="2px"></Padding>
<BorderDetails ColorTop="Gray" WidthLeft="0px" WidthTop="0px" ColorLeft="Gray"></BorderDetails>
</SelectedRowStyleDefault>
<FrameStyle Width="746px" BorderWidth="1px" BorderColor="Black" BorderStyle="Solid"
BackColor="Transparent" Height="100px">
</FrameStyle>
<FooterStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">
<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails>
</FooterStyleDefault>
<FixedHeaderStyleDefault TextOverflow="Ellipsis" Cursor="Hand" HorizontalAlign="Left">
</FixedHeaderStyleDefault>
<RowAlternateStyleDefault BackColor="WhiteSmoke" CssClass="TableData" BorderWidth="1px"
BorderStyle="NotSet" Cursor="hand">
<Padding Left="3px" Top="2px"></Padding>
<BorderDetails ColorTop="Gray" WidthLeft="0px" WidthTop="0px" ColorLeft="Gray"></BorderDetails>
</RowAlternateStyleDefault>
<RowStyleDefault BorderWidth="1px" BorderColor="Silver" BorderStyle="NotSet" BackColor="Transparent"
CssClass="TableData" Cursor="Hand">
<Padding Left="3px" Top="2px"></Padding>
<BorderDetails ColorTop="Gray" WidthLeft="0px" WidthTop="0px" ColorLeft="Gray"></BorderDetails>
</RowStyleDefault>
</DisplayLayout>
</igtbl:UltraWebGrid>


  • 16310
    Offline posted

    Hi,

    The WebDataGrid does not expose most of its properties through a subclass as the UltraWebGrid does with the DisplayLayout. A WebDataGrid exposes those properties, events, etc either from the main class or from the behavior classes. A similar WebDataGrid configuration would look like this:

                <ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="100%"
                    DataKeyFields="id"
                    AutoGenerateColumns="True"
                    OnInit="WebDataGrid1_Init"
                    OnRowSelectionChanged="WebDataGrid1_RowSelectionChanged">

                    <ClientEvents Click="WebDataGrid1_Grid_Click" />

                    <Columns>
                        <ig:BoundDataField DataFieldName="id" Key="id" Width="75px">
                            <Header Text="id">
                            </Header>
                        </ig:BoundDataField>
                    </Columns>

                    <Behaviors>
                        <ig:Selection CellClickAction="Row" RowSelectType="Single" SelectedRowSelectorCssClass="selectedRow">
                        </ig:Selection>
                        <ig:EditingCore>
                            <behaviors>
                                <ig:CellEditing>
                                    <CellEditingClientEvents ExitingEditMode="WebDataGrid1_CellEditing_ExitingEditMode" />
                                </ig:CellEditing>
                            </behaviors>
                        </ig:EditingCore>
                    </Behaviors>
                </ig:WebDataGrid>

    This examples shows how basic properties are set, attaching to client side and server side events, where and how behaviors are defined along with attaching to their events too. I suggest that you look over our online samples at http://www.infragistics.com/samples/aspnet/data-grid/overview as they cover many core user scenarios you can review both the markup and code behind.