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
177
reading Bands and Columns from file or xml file
posted

Hello,

i use UltraWebGrid 10.2 CLR 3.5 and i have many different datasources.

What i want is to maintenance Column width, Column hidden etc. in a file and load it at runtime, for example in InitializeLayout Event. Different datasource has different columnname.

One datasource is XDoc, one datasource is Entity. I works fine but the columns are fixed and have a column width 200px. This is not nice and I want to specified the columns by file so it is easy to change width or hidden of colums without compile the source codes.

How I can do that, because LoadLayout is obsolate and XmlRead I don't know to use. I can't find any examples in Web. 

UltraWebGrid in HTML:

                    <igtbl:UltraWebGrid ID="OrderGrid" runat="server" Browser="Xml" Height="40%" Width="100%"
                        oninitializelayout="OrderGrid_InitializeLayout"
                        onpageindexchanged="OrderGrid_PageIndexChanged"
                        onselectedrowschange="OrderGrid_SelectedRowsChange"
                        oninitializerow="OrderGrid_InitializeRow"
                        ondatabinding="OrderGrid_DataBinding"
                        onexpandrow="OrderGrid_ExpandRow"
                        TabIndex="2">
                        <DisplayLayout RowHeightDefault="18px" Version="4.00" SelectTypeRowDefault="Single"
                            ViewType="Hierarchical" BorderCollapseDefault="Separate" AllowColSizingDefault="Free"
                            Name="OrderGrid" TableLayout="Fixed" StationaryMargins="Header" CellClickActionDefault="RowSelect"
                            Section508Compliant="True" UseFixedHeaders="True"
                            IndentationTypeDefault="Flat">
                            <FrameStyle BackColor="White" BorderColor="WhiteSmoke" BorderStyle="Solid"
                                BorderWidth="1px" Font-Names="Microsoft Sans Serif" Font-Size="8pt"
                                HorizontalAlign="Center" Width="100%">
                            </FrameStyle>
                            <RowAlternateStyleDefault BackColor="#F9F9F9">
                            </RowAlternateStyleDefault>
                            <Pager AllowPaging="True" StyleMode="PrevNext" PageSize="10">
                                <PagerStyle HorizontalAlign="Center" VerticalAlign="Bottom" Font-Bold="True" />
                            </Pager>
                            <FooterStyleDefault BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                                <BorderDetails ColorLeft="White" ColorTop="White"
                                    WidthLeft="1px" WidthTop="1px" />
                            </FooterStyleDefault>
                            <HeaderStyleDefault BackColor="#F3F3F3" BorderStyle="Solid"
                                ForeColor="Black" HorizontalAlign="Left">
                                <BorderDetails ColorLeft="White" ColorTop="White"
                                    WidthLeft="1px" WidthTop="1px" />
                            </HeaderStyleDefault>
                            <RowStyleDefault BorderWidth="1px"
                                BorderColor="WhiteSmoke" BorderStyle="None" BackColor="Window">
                                <Padding Left="3px" />
                                <BorderDetails ColorLeft="Window" ColorTop="Window"></BorderDetails>
                            </RowStyleDefault>
                            <SelectedRowStyleDefault BackColor="#B2E0FE">
                            </SelectedRowStyleDefault>
                            <ActivationObject BorderColor="168, 167, 191" BorderWidth=""></ActivationObject>
                        </DisplayLayout>
                        <Bands>
                            <igtbl:UltraGridBand>
                                <AddNewRow View="NotSet" Visible="NotSet">
                                </AddNewRow>
                            </igtbl:UltraGridBand>
                        </Bands>
                    </igtbl:UltraWebGrid>
 

Thanks for help.

Regards

Ralf