<asp:UpdatePanel ID="upGetStatus" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Panel ID="pnlMain" runat="server"> <asp:Label ID="lblError" runat="server" Font-Bold="true" ForeColor="Red"></asp:Label> <br /> <div id="Div1" style="z-index: 103; width: 80%; text-align: left" runat="server" font-size="Large" font-names="Arial" font-bold="True" height="21px"> <div> <div style="width: 20%; float: left"> <asp:Label ID="lblParentSerialNumber" runat="server">Parent Serial #</asp:Label> </div> <div style="width: 80%;"> <asp:TextBox ID="txtParentSerialNumber" runat="server" Width="150px" CausesValidation="false" AutoPostBack="false" MaxLength="12"></asp:TextBox> </div> </div> <div> <div style="width: 20%; float: left; height: 19px;"> <asp:Label ID="lblSubSerialNumbers" runat="server">Sub Serial #</asp:Label> </div> <div style="width: 50%;"> <asp:TextBox ID="txtSubSerialNumbers" runat="server" TextMode="MultiLine" Width="150px" Height="150px" AutoPostBack="false" CausesValidation="false"></asp:TextBox> </div> </div> <div style="float: right"> <asp:Button ID="btnValidate" TabIndex="6" runat="server" Font-Bold="True" Width="130px" BackColor="DarkKhaki" Text="Validate and Save" CausesValidation="true"></asp:Button> <%-- <asp:Button ID="btnSave" TabIndex="4" runat="server" Font-Bold="True" Width="70px" BackColor="Green" Text="Save" Enabled="false" />--%> <asp:Button ID="btnClear" TabIndex="5" runat="server" Font-Bold="True" Width="70px" BackColor="Peru" Text="Clear" CausesValidation="false" /> </div> </div> <br /> <div style="width: 80%; text-align: left"> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid11"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Width="95%" Transparency="5"> <img style="border: 0; margin-top: 150px;" alt="Loading..." src="Images/infineralogo.gif" /> </telerik:RadAjaxLoadingPanel> <telerik:RadGrid ID="RadGrid1" runat="server" Width="95%" ShowStatusBar="true" AutoGenerateColumns="False" PageSize="10" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" AlternatingItemStyle-BackColor="Ivory" ItemStyle-BackColor="LightGoldenrodYellow" HeaderStyle-BackColor="SandyBrown" GridLines="None"> <PagerStyle Mode="NumericPages"></PagerStyle> <MasterTableView Width="100%" DataKeyNames="ParentSerialNumber" AllowMultiColumnSorting="False"> <DetailTables> <telerik:GridTableView DataKeyNames="SerialNoAssociateId" Name="SubSerialNumberGrid" Width="100%" AllowSorting="true"> <Columns> <telerik:GridBoundColumn SortExpression="SerialNoAssociateId" HeaderText="SerialNoAssociateId" HeaderButtonType="TextButton" DataField="SerialNoAssociateId" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="ParentSerialNumber" HeaderText="ParentSerialNumber" HeaderButtonType="TextButton" DataField="ParentSerialNumber" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="SubSerialNumber" HeaderText="Sub Serial Number" HeaderButtonType="TextButton" DataField="SubSerialNumber"> </telerik:GridBoundColumn> <telerik:GridButtonColumn HeaderText="Delete" ConfirmTitle="MPT" ConfirmDialogType="Classic" ButtonType="ImageButton" ConfirmText="Are you sure you want to delete?" ItemStyle-HorizontalAlign="Left" CommandName="DeleteSubSerial" Text="Delete" ImageUrl="Images/Delete.jpg"> </telerik:GridButtonColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn SortExpression="ParentSerialNumber" HeaderText="Parent Serial Number" HeaderButtonType="TextButton" DataField="ParentSerialNumber"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> </div> <br /> <div style="width: 80%; text-align: left"> <asp:DataGrid ID="dgdErrors" runat="server" AutoGenerateColumns="true" CellSpacing="2" GridLines="None" Visible="false"> <AlternatingItemStyle BackColor="Ivory"></AlternatingItemStyle> <ItemStyle BackColor="LightGoldenrodYellow"></ItemStyle> <HeaderStyle BackColor="SandyBrown"></HeaderStyle> </asp:DataGrid> </div> </asp:Panel> </ContentTemplate> </asp:UpdatePanel>| string editID = Request.QueryString["edit_id"]; if (editID != null) { RadWindowManager1.Windows[0].VisibleOnPageLoad = true; } else { RadWindowManager1.Windows[0].VisibleOnPageLoad = false; } |

Hi,
I am trying to figure this out for past couple of days.
I would like to know how to implement RadGrid with xmldatasource. It's pretty easy to bind it in the front end. But I would like to bind the xml to gridview from serverside. I would like to use XPath and DOM model to select the nodes/attributes from my Xml to be displayed as columns in the Gridview and content accordingly. My Xml looks something similar to this:
<structure>
<headers>
<headertext text="Product Name">
<headertext text="Product ID">
<headertext text="Product No.">
</headers>
<content>
<row value="Apple">
<row value="123">
<row value="354367">
</row>
</row>
I would like to populate HeaderText (Product Name, Product ID .... as column header) from server side using XPath and DOM and rows for each of the columns. Basically, there can be many columns and I have to iterate through each of them and display all column with all data.
Secondly, I am not able to create an instance of XmlDocument to load the xml from the server side, causing couple of errors.
Would be great if someone can help me in this issue.
Thanks.
<telerik:GridDropDownColumn HeaderStyle-Width="140" ItemStyle-Width="140" FooterStyle-Width="140" UniqueName="MCHAVER" DataField="MCHAVER" HeaderImageUrl="~/Skins/Gray/Grid/BursaMas.JPG" DropDownControlType="DropDownList" ListTextField="Text" ListValueField="Key" AutoPostBackOnFilter="true" />