This is a migrated thread and some comments may be shown as answers.

Grid Rebind on Postback XML Datasource

1 Answer 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Brandon asked on 18 Jul 2012, 04:04 PM
I have seen many threads on this - but none have presented a fix for my issue. I cannot get the grid to rebind to an xml datasource. Any help would be very appreciated.
<body>
    <form id="form1" runat="server">
        <center>
            <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Hay">
                <TargetControls>
                    <telerik:TargetControl ControlID="RadTextBox1" />
                    <telerik:TargetControl />
                    <telerik:TargetControl ControlID="RadSplitter2" />
                    <telerik:TargetControl />
                    <telerik:TargetControl ControlID="m_navPanelBar" />
                    <telerik:TargetControl />
                </TargetControls>
            </telerik:RadSkinManager>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>
 
            <asp:XmlDataSource ID="m_xmlDs" runat="server"></asp:XmlDataSource>
 
            <telerik:RadSplitter ID="RadSplitter1" Runat="server" Orientation="Horizontal" Width="100%" Height="100%">
 
                <telerik:RadPane ID="RadPane1" Runat="server" Height="150">
                    <asp:Label ID="m_lblConnection" runat="server" Text="Label"></asp:Label>
                    <telerik:RadTextBox ID="RadTextBox1" Runat="server" Width="100%" Height="100" TextMode="MultiLine">
                    </telerik:RadTextBox>
                    <telerik:RadButton ID="Button1" runat="server" Text="Run"/>
                </telerik:RadPane>
 
                <telerik:RadPane ID="RadPane2" runat="server">
                    <telerik:RadGrid ID="m_grid" runat="server" DataSourceID="m_xmlDs">
                    </telerik:RadGrid>
                </telerik:RadPane>
 
            </telerik:RadSplitter>
        </center>
    </form>
</body>
protected void Page_Load(object sender, EventArgs e)
{
   if(IsPostBack)
   {
      m_xmlDs.Data = "<rows><row id=\"100\" name=\"Person\" LastName=\"One\" /><row id=\"101\" name=\"Person\" LastName=\"Two\" /></rows>";
      m_grid.Rebind();
   }
   else
   {
      m_xmlDs.Data = "<root />";
   }
}

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 23 Jul 2012, 07:25 AM
Hi Brandon,

I tried to reproduce the described issue but to no avail. I am sending you a simple example, based on your code. Please check it out and let me know if it helps you.

Looking forward for your reply.

Kind regards,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Brandon
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or