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

Databinding RadGrid in Sliding Pane

2 Answers 51 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Julie
Top achievements
Rank 1
Julie asked on 27 May 2009, 09:32 PM
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.

    private

 

DataTable ErrorDataTable = new DataTable();

 

    

ErrorDataTable.Clear();

 

//-- Add columns to the data table

 

ErrorDataTable.Columns.Add(

"TemplateLineID", typeof(int));

 

ErrorDataTable.Columns.Add(

"TemplateControlID", typeof(int));

 

ErrorDataTable.Columns.Add(

"ParentControlID", typeof(int));

 

ErrorDataTable.Columns.Add(

"ToggledControlID", typeof(int));

 

ErrorDataTable.Columns.Add(

"Section", typeof(string));

 

ErrorDataTable.Columns.Add(

"Page", typeof(string));

 

ErrorDataTable.Columns.Add(

"ErrorMsg", typeof(string));

 

 

 

// Now Test the binding

 

 

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

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

 


gridErrors2.DataSource = ErrorDataTable;

gridErrors2.DataBind();


**********
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"

 

 

Width="440px">

 

 

 

<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" />

 

 

</headercontextmenu>

 

 

 

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

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

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

 

 

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

 

 

<HeaderStyle Width="50px" />

 

 

</telerik:GridBoundColumn>

 

 

 

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

 

 

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

 

 

<HeaderStyle Width="50px" />

 

 

</telerik:GridBoundColumn>

 

 

 

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

 

 

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

 

 

<HeaderStyle Width="50px" />

 

 

</telerik:GridBoundColumn>

 

 

 

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

 

 

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

 

 

<HeaderStyle Width="50px" />

 

 

</telerik:GridBoundColumn>

 

 

 

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

 

 

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

 

 

<HeaderStyle Width="70px" />

 

 

</telerik:GridBoundColumn>

 

 

 

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

 

 

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

 

 

<HeaderStyle Width="50px" />

 

 

</telerik:GridBoundColumn>

 

 

 

<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:GridBoundColumn>

 

 

 

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

 

 

UniqueName="column">

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

</mastertableview>

 

 

<clientsettings enablepostbackonrowclick="True">

 

 

<selecting allowrowselect="True" />

 

 

 

 

</clientsettings>

 

 

<filtermenu enabletheming="True">

 

 

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

 

 

</filtermenu>

 

 

</telerik:RadGrid>

 

 

</asp:Panel>

 

 

</telerik:RadAjaxPanel>

 

 

 

</telerik:RadSlidingPane>

 

    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
~Julie
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 Answers, 1 is accepted

Sort by
0
Julie
Top achievements
Rank 1
answered on 28 May 2009, 04:52 PM
Sorry posted in the wrong forum...
It is in the splitter control..I will post over there.
Thanks
Julie
0
Tsvetie
Telerik team
answered on 29 May 2009, 09:09 AM
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,
Tsvetie
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.
Tags
Slider
Asked by
Julie
Top achievements
Rank 1
Answers by
Julie
Top achievements
Rank 1
Tsvetie
Telerik team
Share this question
or