Databinding RadGrid in Sliding Pane

3 posts, 0 answers
  1. Julie
    Julie avatar
    27 posts
    Member since:
    Dec 2008

    Posted 27 May 2009 Link to this post

    Hi Telerik Support,
    I am having problems databinding to a grid inside a sliding pane. 
    Here is the scenerio:
        I am error checking a dynamically created form for errors, and I write the errors to a datatable.



    DataTable ErrorDataTable = new DataTable();





    //-- Add columns to the data table



    "TemplateLineID", typeof(int));



    "TemplateControlID", typeof(int));



    "ParentControlID", typeof(int));



    "ToggledControlID", typeof(int));



    "Section", typeof(string));



    "Page", typeof(string));



    "ErrorMsg", typeof(string));




    // Now Test the binding



    ErrorDataTable.Rows.Add(-1, -1, -1, -1,

    "", "", "No Errors Found");


    gridErrors2.DataSource = ErrorDataTable;


    Button clicked event
    We clear the ErrorDataTable and add more rows
    then we bind to gridErrors2 as above...
    I am not getting any data, gridErrors outside of the sliding pane returns the rows as expected.

    //The ASPX...



    telerik:RadSlidingPane ID="ErrorSlidingPane" runat="server"



    iconurl="Images/Toolbar/AttachBtn.gif" tabview="ImageOnly" title="Errors" width="460px">



    <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">



    <asp:Panel ID="Panel2" runat="server" Height="200px" style="OVERFLOW: auto"







    <telerik:RadGrid ID="gridErrors2" runat="server" AutoGenerateColumns="False"



    ClientSettings-Selecting-AllowRowSelect="true" CssClass="gridText"



    Skin="Vista" Width="420px">



    <headercontextmenu enabletheming="True">



    <collapseanimation duration="200" type="OutQuint" />







    <MasterTableView ClientDataKeyNames="TemplateLineID,TemplateControlID,Page">






    <HeaderStyle Width="20px" />









    <HeaderStyle Width="20px" />









    <telerik:GridBoundColumn DataField="TemplateLineID" HeaderText="Node ID"



    ReadOnly="true" UniqueName="TemplateLineID" Visible="False">



    <HeaderStyle Width="50px" />







    <telerik:GridBoundColumn DataField="TemplateControlID" HeaderText="Control ID"



    ReadOnly="true" UniqueName="TemplateControlID" Visible="False">



    <HeaderStyle Width="50px" />







    <telerik:GridBoundColumn DataField="ParentControlID" HeaderText="Parent Control ID"



    ReadOnly="true" UniqueName="ParentControlID" Visible="False">



    <HeaderStyle Width="50px" />







    <telerik:GridBoundColumn DataField="ToggledControlID" HeaderText="Toggled Control ID"



    ReadOnly="true" UniqueName="ToggledControlID" Visible="False">



    <HeaderStyle Width="50px" />







    <telerik:GridBoundColumn DataField="Section" HeaderText="Section"



    ReadOnly="true" UniqueName="Section" Visible="True">



    <HeaderStyle Width="70px" />







    <telerik:GridBoundColumn DataField="Page" HeaderText="Page"



    ReadOnly="true" UniqueName="Page" Visible="True">



    <HeaderStyle Width="50px" />







    <telerik:GridBoundColumn DataField="ErrorMsg" HeaderText="Please Correct the Following Errors" ItemStyle-CssClass="gridTextRequired"



    ReadOnly="True" UniqueName="ErrorMsg" HeaderStyle-ForeColor="Red">



    <HeaderStyle Width="220px" />



    <ItemStyle CssClass="gridTextRequired" />







    <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Select" HeaderText="Select" ItemStyle-CssClass="gridTextRequired" Text="Go To Page"
















    <clientsettings enablepostbackonrowclick="True">



    <selecting allowrowselect="True" />








    <filtermenu enabletheming="True">



    <collapseanimation duration="200" type="OutQuint" />


















        I have two exact same grids one in the sliding pane and one outside of the sliding pane.  
        I bind both grids to the same data source
        The data source is populated when the users clicks a toolbar button labeled check errors.
        The one not located in the pane displays the data
        The other located in the pane does not display the data.

    Any help would be appreciated
    Thanks in advance
    I am currently on the version released before April 2, we are too close for release to change out the controls and update with the new ones. 
  2. Julie
    Julie avatar
    27 posts
    Member since:
    Dec 2008

    Posted 28 May 2009 Link to this post

    Sorry posted in the wrong forum...
    It is in the splitter control..I will post over there.
  3. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 29 May 2009 Link to this post

    Hello Julie,
    I moved your post to the RadSplitter forum.

    I created a simple test pages, based on the provided information and code but was not able to reproduce the problem you describe. I have attached my test page for your reference.

    Could you please try the following - set EnableAJAX="false" for the RadAjaxPanel to see if the grid will show the new records. I suggest that you try this as I noticed that the toolbar button that you use to rebind the grid in not in the RadAjaxPanel - in order to rebind the RadGrid during an AJAX request, you need to update it.

    In case the test page or suggestion does not help you fix the problem, please prepare and send me a simple running project, demonstrating the problem as well as detailed information on the steps I need to follow in order to reproduce it.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top