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

Problem with heirarchy storing data to a control

4 Answers 118 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DragonBall
Top achievements
Rank 1
DragonBall asked on 04 Aug 2008, 08:35 AM
I have grid that is nested within a grid but it wont store the data that comes from a dataset
it only stores on the variable and after the process the data disappears from the control cany anybody help me with this.

ASP

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Grid.aspx.cs" Inherits="Aspx_Grid" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">


.RadGrid_Office2007
{
font:11px tahoma,verdana,arial,sans-serif;
}

.RadGrid_Office2007
{
border:1px solid #3b5a82;
background:#fff;
color:#27413e;

scrollbar-face-color:#E9E9E9;
scrollbar-highlight-color:#FFFFFF;
scrollbar-shadow-color:#E9E9E9;
scrollbar-3dlight-color:#DBDBDB;
scrollbar-arrow-color:#787878;
scrollbar-track-color:#F5F5F5;
scrollbar-darkshadow-color:#AEAEAE;
}

.MasterTable_Office2007
{
border-collapse:separate !important;
}

.MasterTable_Office2007
{
font:11px tahoma,verdana,arial,sans-serif;
}

.GridCommandRow_Office2007
{
background:#fafafa;
}

.GridCommandRow_Office2007 td
{
border-bottom:1px solid #688caf;
padding:2px 4px;
}

.GridCommandRow_Office2007 td td
{
border:0;
padding:1px;
}

.GridCommandRow_Office2007 a
{
color:#000;
text-decoration:none;
}

.GridHeader_Office2007
{
border-left:1px solid #9eb6ce;
border-bottom: solid 1px #9eb6ce;
padding-top:3px;
padding-bottom:3px;
background:url('mvwres://Telerik.Web.UI, Version=2008.1.515.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Office2007.Grid.sprite.gif') 0 -200px repeat-x #d3dbe9;
text-align:left;
}

.GridHeader_Office2007
{
padding-left:4px;
padding-right:4px;
}

.GridFilterRow_Office2007
{
background:#fafafa;
}

.GridFilterRow_Office2007 td
{
border:1px #d0d7e5;
border-style:none none solid solid;
padding-top:4px;
padding-bottom:4px;
}

.GridFilterRow_Office2007 td
{
padding-left:4px;
padding-right:4px;
}

.GridFooter_Office2007
{
color:#666;
}

.GridFooter_Office2007 td
{
border:1px #d0d7e5;
border-style:none none solid solid;
padding-top:4px;
padding-bottom:4px;
}

.GridFooter_Office2007 td
{
padding-left:4px;
padding-right:4px;
}

.GridPager_Office2007
{
background:url('mvwres://Telerik.Web.UI, Version=2008.1.515.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Office2007.Grid.sprite.gif') 0 -600px repeat-x #d7e5f7;
line-height:20px;
}

.GridPager_Office2007 td
{
border-top:1px solid #567db0;
border-bottom:1px solid #fff;
padding:1px 4px 2px;
}

.PagerLeft_Office2007
{
float:left;
}

.GridPager_Office2007 div span
{
color:#01285c;
}

.GridPager_Office2007 span
{
color:#193d65;
}

.PagerRight_Office2007
{
float:right;
}

.GridRow_Office2007 td
{
border:1px #d0d7e5;
border-style:none none solid solid;
padding-top:4px;
padding-bottom:4px;
}

.GridRow_Office2007 td
{
padding-left:4px;
padding-right:4px;
}

.radInput_Default
{
font:11px arial,tahoma,verdana,sans-serif;
vertical-align:middle;
}

.radInput_Default
{
font:11px arial,tahoma,verdana,sans-serif;
vertical-align:middle;
}

.radInput_Default
{
font:11px arial,tahoma,verdana,sans-serif;
vertical-align:middle;
}

.radEnabledCss_Default 
{
border:1px solid #626262;
}

.radEnabledCss_Default
{
font:11px arial,tahoma,verdana,sans-serif;
padding:2px 0 2px 1px;
color:#333;
}

.radEnabledCss_Default 
{
border:1px solid #626262;
}

.radEnabledCss_Default
{
font:11px arial,tahoma,verdana,sans-serif;
padding:2px 0 2px 1px;
color:#333;
}

.radEnabledCss_Default 
{
border:1px solid #626262;
}

.radEnabledCss_Default
{
font:11px arial,tahoma,verdana,sans-serif;
padding:2px 0 2px 1px;
color:#333;
}

.RadGrid_Default
{
border:1px solid #232323;
}

.RadGrid_Default
{
font:11px/1.4 arial,sans-serif;
}

.RadGrid_Default
{
background:#d4d0c8;
color:#333;
}

.MasterTable_Default
{
background:#fff;
border-collapse:separate !important;
}

.MasterTable_Default
{
font:11px/1.4 arial,sans-serif;
}

.GridHeader_Default
{
color:#fff;
text-decoration:none;
}

.GridHeader_Default
{
border-bottom:1px solid #010101;
background:url('mvwres://Telerik.Web.UI, Version=2008.1.515.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.Grid.headers.gif') repeat-x #434343;
padding:10px 6px 10px 11px;
text-align:left;
font-size:1.3em;
font-weight:normal;
}

.GridFooter_Default
{
color:#666;
}

.GridFooter_Default td
{
border-top:1px solid #e8e8e8;
}

.GridFooter_Default td
{
border-left:1px solid #7e7e7e;
}

.GridFooter_Default td
{
padding-top:0.4em;
padding-bottom:0.4em;
}

.GridFooter_Default td
{
padding-left:10px;
padding-right:6px;
}

.GridRow_Default td
{
border-left:1px solid #7e7e7e;
}

.GridRow_Default td
{
padding-top:0.4em;
padding-bottom:0.4em;
}

.GridRow_Default td
{
padding-left:10px;
padding-right:6px;
}

</style>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
ConnectionString="<%$ ConnectionStrings:MeetWebStyleConnectionString %>" 
SelectCommand="MWS_Meetings_Get_List" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>


<asp:SqlDataSource ID="SqlDSBrainStormIDView" runat="server" 
ConnectionString="<%$ ConnectionStrings:MeetWebStyleConnectionString %>" 
SelectCommand="MWS_Brainstorm_items_GetByMeeting_idView" 
SelectCommandType="StoredProcedure" >
<SelectParameters>
<asp:ControlParameter ControlID="RadGrid1" DefaultValue="7" Name="Meeting_id" 
PropertyName="SelectedValue" Type="Int32" />
<%--<asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="meeting_id" />--%>
</SelectParameters>



</asp:SqlDataSource>


<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>


<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>

<asp:Label ID="Label3" Font-Bold="true" Font-Italic="true" Text='<%# Eval("meetings_id") %>' Visible="false" runat="server" />
<asp:Label ID="Label4" Font-Bold="true" Font-Italic="true" Text='<%# Eval("meetings_id") %>' Visible="false" runat="server" />
<telerik:RadGrid ID="RadGrid1" runat="server"  
DataSourceID="SqlDataSource1"
GridLines="None" AllowPaging="True" AutoGenerateColumns="False" 
Skin="Office2007" AllowFilteringByColumn="True" ItemStyle-Wrap="true" ItemStyle-Width="500px" TableLayout="Fixed">


<MasterTableView commanditemdisplay="Top" datasourceid="SqlDataSource1" 
editmode="PopUp" AllowPaging="true" AutoGenerateColumns="False" 
Font-Bold="False" Font-Italic="False" Font-Overline="False" 
Font-Strikeout="False" Font-Underline="False">

<Columns>

<telerik:GridBoundColumn DataField="meetings_id" HeaderText="Meeting ID" 
UniqueName="column" >
<ItemStyle Width="50px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="project_id" HeaderText="Project ID" 
UniqueName="column1" >
<ItemStyle Width="50px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="meeting_title" HeaderText="Title" 
UniqueName="column2" >
<ItemStyle Width="50px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="start_date" HeaderText="Starting Date" 
UniqueName="column3" >
<ItemStyle Width="50px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="end_date" HeaderText="End Date" 
UniqueName="column4" >
<ItemStyle Width="50px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="meeting_speaker_id" HeaderText="Speaker" 
UniqueName="column5">
<ItemStyle Width="50px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="recurrenceRule" HeaderText="Rule" 
UniqueName="column6" ItemStyle-Wrap="true" >
<ItemStyle Width="100px" /> 
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="recurrenceParentID" HeaderText="Rule ID" 
UniqueName="column7" >
<ItemStyle Width="100px" />
</telerik:GridBoundColumn>
</Columns>
<NestedViewTemplate>




<asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("meetings_id") %>' Visible="false" runat="server" />


<asp:SqlDataSource ID="SqlDSMeetingNotes" runat="server" 
ConnectionString="<%$ ConnectionStrings:MeetWebStyleConnectionString %>" 
SelectCommand="MWS_Meeting_notes_GetByMeeting_id" 
SelectCommandType="StoredProcedure" 
InsertCommandType="StoredProcedure" InsertCommand="MWS_Meeting_notes_Insert" 
UpdateCommandType="StoredProcedure" UpdateCommand="MWS_Meeting_notes_Update">

<SelectParameters>
<asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="meeting_id" />
</SelectParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="meeting_id" />
</UpdateParameters>
<InsertParameters>
<asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="meeting_id" />
</InsertParameters>

</asp:SqlDataSource>


<telerik:RadGrid ID="RAD1" runat="server" GridLines="None" AllowFilteringByColumn="True" 
AllowPaging="True" PageSize="5" AllowSorting="True" Width="100%" AutoGenerateColumns="False"
ShowStatusBar="False" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" DataSourceID="SqlDSMeetingNotes" HorizontalAlign="NotSet" Skin="Office2007" >


<MasterTableView EditMode="PopUp" CommandItemDisplay="Top" DataKeyNames="meeting_id" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" EditFormSettings-PopUpSettings-Width="800px" DataSourceID="SqlDSMeetingNotes">
<GroupHeaderItemStyle />

<Columns>
<telerik:GridEditCommandColumn UniqueName="EditColumn" HeaderText="Meeting Note"/>
<telerik:GridHTMLEditorColumn
UniqueName="meeting_note_text"
DataField="meeting_note_text"
HeaderText="Notes" EditFormColumnIndex="1" />
<telerik:GridDropDownColumn DataField="meeting_note_id"
UniqueName="meeting_note_id"
ListTextField="meeting_note_id"
DataSourceID="SqlDSMeetingNotes"
HeaderText="ID"
DropDownControlType="RadComboBox" Resizable="true" EditFormColumnIndex="0" />
<telerik:GridDropDownColumn DataField="user_id"
UniqueName="user_id"
ListTextField="user_id"
DataSourceID="SqlDSMeetingNotes"
HeaderText="USER ID"
Display="false"
DropDownControlType="RadComboBox" Resizable="true" EditFormColumnIndex="0" /> 
</Columns>
<EditFormSettings ColumnNumber="3" CaptionFormatString="Edit Meeting Details with Meeting {0}" CaptionDataField="meeting_id" >

<FormTemplate>

<table style="width: 171px">
<tbody>
<tr>
<td>
<asp:TextBox ID="TextBox2" runat="server"
Text='<%# Bind("meeting_note_id") %>'></asp:TextBox>

</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("meeting_note_text") %>'></asp:TextBox>

</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TextBox3" runat="server"
Text='<%# Bind("user_id") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>&nbsp;
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button></td>
</tr>
</tbody>
</table>  



</FormTemplate>
</EditFormSettings>

</MasterTableView>
</telerik:RadGrid>


<asp:Label ID="Label2" Font-Bold="true" Font-Italic="true" Text='<%# Eval("project_id") %>' Visible="false" runat="server" />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
ConnectionString="<%$ ConnectionStrings:MeetWebStyleConnectionString %>" 
SelectCommand="MWS_Library_documentsView_GetByProjectID" 
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="Label2" Name="project_id" PropertyName="Text"/>
</SelectParameters>
</asp:SqlDataSource>
<telerik:RadGrid ID="RadGrid2" runat="server" GridLines="None" AllowFilteringByColumn="True" 
AllowPaging="True" PageSize="5" AllowSorting="True" Width="100%" AutoGenerateColumns="false"
ShowStatusBar="False" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" DataSourceID="SqlDataSource2" 
HorizontalAlign="NotSet" Skin="Office2007"  
OnItemCommand ="Radgrid2_ItemCommand" OnPreRender="RadGrid2_PreRender" Visible="true" OnNeedDataSource="RadGrid2_NeedDataSource">
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>

<MasterTableView EditMode="PopUp" CommandItemDisplay="Top" DataKeyNames="project_id" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" EditFormSettings-PopUpSettings-Width="800px" >
<GroupHeaderItemStyle />

<Columns>
<telerik:GridEditCommandColumn UniqueName="EditColumn1" HeaderText="Document"/>


<telerik:GridBoundColumn
DataField="thumbnail_available"
UniqueName="thumbnail_available"
EditFormColumnIndex="0"
HeaderText="Thumbnail" Visible="false"
/>

<telerik:GridBoundColumn
DataField="library_docuemnt_images_id"
UniqueName="library_docuemnt_images_id"
EditFormColumnIndex="0"
HeaderText="Library ID" Visible="false"
/>


</Columns>
<EditFormSettings ColumnNumber="3" CaptionFormatString="Edit Library Document {0}" CaptionDataField="meeting_id" >


</EditFormSettings>
<NestedViewTemplate>
<fieldset style="padding:10px; azimuth:center; size:landscape; width:50%;">
<legend style="padding:5px;"><b>Library:</b>
<asp:Label ID="Label5" Font-Bold="true" Font-Italic="true" 
Text='<%# Eval("library_category_id") %>' Visible="false" runat="server" />

</legend>

<asp:SqlDataSource ID="SqlDataSource3" runat="server" 
ConnectionString="<%$ ConnectionStrings:MeetWebStyleConnectionString %>" 
SelectCommand="MWS_Library_documentsView_GetByProjectID" 
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="Label2" Name="project_id" PropertyName="Text"/>
</SelectParameters>
</asp:SqlDataSource>


<asp:DetailsView ID="DetailsView1" AllowPaging="true" GridLines="None" Width="100%" DataSourceID="SqlDataSource3"
DataKeyNames="project_id" runat="server" CommandRowStyle-Wrap="false"  
AutoGenerateRows="false">

<%--<Fields>
<asp:BoundField 
DataField="library_category_id"
HeaderText="ID"
/>
</Fields>
<Fields>
<asp:BoundField
DataField="iibrary_category_name"
HeaderText="Name"
/>
</Fields>
<Fields>
<asp:BoundField 
DataField="upload_date"
HeaderText="Date"
/>
</Fields>
<Fields>
<asp:BoundField 
DataField="uri"
HeaderText="Location"
/>
</Fields>
<Fields>
<asp:imagefield dataimageurlfield="uri" 
alternatetext="Image"
nulldisplaytext="No image on file."
headertext="Image"  
readonly="true"/>
</Fields>--%>






</asp:DetailsView>
</fieldset>
</NestedViewTemplate>
</MasterTableView>
</telerik:RadGrid>
</NestedViewTemplate>







<RowIndicatorColumn Visible="False"><HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>

<telerik:GridEditCommandColumn UniqueName="EditColumns" />

</Columns>  
<EditFormSettings>

<PopUpSettings ScrollBars="None"></PopUpSettings>
</EditFormSettings>
<GroupHeaderItemStyle Font-Bold="False" Font-Italic="False" 
Font-Overline="False" Font-Strikeout="False" Font-Underline="False" 
ForeColor="Black" Wrap="True" />

<HeaderStyle BackColor="Black" Font-Bold="False" Font-Italic="False" 
Font-Overline="False" Font-Strikeout="False" Font-Underline="False" 
ForeColor="Black" Wrap="True" />
</MasterTableView>
<HeaderStyle ForeColor="Brown" />



</telerik:RadGrid>


<p>
<telerik:RadTextBox ID="RadTextBox1" Runat="server" 
onprerender="RadTextBox1_PreRender">
</telerik:RadTextBox>
<telerik:RadTextBox ID="RadTextBox2" Runat="server">
</telerik:RadTextBox>
<telerik:RadTextBox ID="RadTextBox3" Runat="server">
</telerik:RadTextBox>
<asp:ListBox ID="ListBox1" runat="server"></asp:ListBox>
</p>



<telerik:RadGrid ID="RadGrid3" runat="server" OnNeedDataSource="RadGrid3_NeedDataSource">
</telerik:RadGrid>


<asp:Label ID="Label6" runat="server" Text="Label"></asp:Label>



</form>
</body>
</html>


C#

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.Web.UI;
public partial class Aspx_Grid : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
int documentid;
public Boolean strtxt;
string documentImageId;
string libraryDocumentId;
string Uri;
DataSet ds;


protected void Page_Render(object sender, EventArgs e)
{



}
protected void Page_PreRender(object sender, EventArgs e)

{



}

protected void Radgrid2_ItemCommand(object sender, EventArgs e)
{


foreach (GridNestedViewItem item1 in RadGrid1.MasterTableView.GetItems(GridItemType.NestedView))
{
RadGrid Grid2 = (RadGrid)item1.FindControl("RadGrid2");


foreach (GridDataItem childitem in Grid2.MasterTableView.Items)
{
if (childitem.Selected)
{

strtxt = Convert.ToBoolean(childitem["thumbnail_available"].Text);

if (strtxt != false)
{
documentid = Convert.ToInt32(childitem["library_docuemnt_images_id"].Text);
ds = LibraryDocument.GetDocument(documentid);

foreach (DataRow row in ds.Tables["Document"].Rows)
{


documentImageId = string.Format("{0}", row["library_docuemnt_images_id"]);
libraryDocumentId = string.Format("{0}", row["library_document_id"]);

Uri = string.Format("{0}", row["uri"]);

RadTextBox1.Text += documentImageId;
RadTextBox2.Text += libraryDocumentId;
RadTextBox3.Text += Uri;


//RadGrid3.DataSource = ds.Tables["Document"].DefaultView;
//RadGrid3.Rebind();
//Grid2.Rebind();
//RadGrid3.MasterTableView.PageSize = 15;
//RadGrid3.MasterTableView.DataKeyNames = new string[] { "library_docuemnt_images_id" };

//GridBoundColumn boundColumn;
//boundColumn = new GridBoundColumn();
//boundColumn.DataField = documentImageId;
//boundColumn.HeaderText = "Library ID";
//RadGrid3.MasterTableView.Columns.Add(boundColumn);




}

}
}

}


}



}



protected void RadGrid3_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
DataSet s = LibraryDocument.GetDocument(documentid);
RadGrid3.DataSource = s.Tables["Document"].DefaultView;
}

protected void RadGrid2_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{

}
protected void RadGrid2_PreRender(object sender, EventArgs e)
{
//foreach (GridDataItem item in RadGrid1.Items)
//{
// if (item.Expanded)
// {
// foreach (GridNestedViewItem nestedViewItem in RadGrid1.MasterTableView.GetItems(GridItemType.NestedView))
// {
// RadGrid Grid2 = (RadGrid)nestedViewItem.FindControl("RadGrid2");
// foreach (GridDataItem chilItem in Grid2.MasterTableView.Items)
// {
// string strTxt = chilItem["thumbnail_available"].Text.ToString();

// }
// }
// }
//}

//int documentid;


}



protected void RadTextBox1_PreRender(object sender, EventArgs e)
{

}


}


4 Answers, 1 is accepted

Sort by
0
DragonBall
Top achievements
Rank 1
answered on 05 Aug 2008, 02:46 AM
i have put the function to a button and it works but when the function is inside the hierarchy it wont work

this is my code for the button

protected void Button1_Click(object sender, EventArgs e)

   {

 

       foreach (GridNestedViewItem item1 in RadGrid1.MasterTableView.GetItems(GridItemType.NestedView))

       {

           RadGrid Grid2 = (RadGrid)item1.FindControl("RadGrid2");

 

 

           foreach (GridDataItem childitem in Grid2.MasterTableView.Items)

           {

               if (childitem.Selected)

               {

 

                   strtxt = Convert.ToBoolean(childitem["thumbnail_available"].Text);

 

                   if (strtxt != false)

                   {

                       documentid = Convert.ToInt32(childitem["library_docuemnt_images_id"].Text);

                       ds = LibraryDocument.GetDocument(documentid);

                       RadGrid3.DataSource = ds;

                       

                   }

               }

           }

 

       }

   }



0
Veli
Telerik team
answered on 05 Aug 2008, 06:54 AM
Hello Manuel,

Please put your inner RadGrid data source "SqlDSMeetingNotes" outside of the NestedViewTemplate of the parent RadGrid, so that the data source is readily available when creating the inner RadGrid early in the page lifecycle.

Rather than that, could you, please explain where do you need to process the data in? The NestedViewTemplate of RadGrid is by default created when an item is expanded, therefore you may not have RadGrid2 available before that. Please share with us your needs.

All the best,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
DragonBall
Top achievements
Rank 1
answered on 05 Aug 2008, 07:08 AM

i have another RadGrid("RadGrid3") outside the nestedviewtemplate, i want to put the dataset inside the "RadGrid3.Datasource=ds" but it wont work for your reply i try moving theSqlDSMeetingNotes but the problem it will not return a result if i move it outside the nestedviewtemplate  and will yield an error

<asp:Label ID="Label2" Font-Bold="true" Font-Italic="true" Text='<%# Eval("project_id") %>' Visible="false" runat="server" />


0
Kiara
Top achievements
Rank 1
answered on 05 Aug 2008, 08:17 AM
See my reply in this thread posted by you:

http://www.telerik.com/community/forums/thread/b311D-bkdttg.aspx

Kiara
Tags
Grid
Asked by
DragonBall
Top achievements
Rank 1
Answers by
DragonBall
Top achievements
Rank 1
Veli
Telerik team
Kiara
Top achievements
Rank 1
Share this question
or