The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
Rad grid dynamically building a grid and adding a hierarchy with declarative relations row_ _ the asp
1. 9/1/2015 RadGrid: dynamically building a grid and adding a hierarchy with declarative relations row? | The ASP.NET Forums
http://forums.asp.net/t/1551140.aspx?RadGrid+dynamically+building+a+grid+and+adding+a+hierarchy+with+declarative+relations+row+ 1/7
Home / ASP.NET Forums / Community / Component Discussions / RadGrid: dynamically building a grid and adding
a hierarchy with decl...
2 replies
Last post May 12, 2010 08:01 AM by bloggernext
RadGrid: dynamically building a grid and adding
a hierarchy with declarative relations row?
[Answered]
RadGrid: dynamically building a grid and adding a hierarchy with declarative relations row?
Apr 26, 2010 12:04 AM | sholdorf
I have searched the internet and can't find out what my final problem is. What I have is RadGrid and I am creating
a sub‐column that is a bound column. Now, when I select the icon to open the sub‐column the relation field's
bound column appearing but even though I am binding a List<> to it I get the message: No child records to
display. Below is the code so if anyone can help with my final problem that would be great!
public partial class _Default : System.Web.UI.Page
{
protected RadGrid grid;
protected static List<TestListItem> list = new List<TestListItem>﴾﴿;
protected static List<TestListItem2> list2 = new List<TestListItem2>﴾﴿;
override protected void OnInit﴾EventArgs e﴿
{
DefineGridStructure﴾﴿;
base.OnInit﴾e﴿;
}
private void DefineGridStructure﴾﴿
{
this.grid = new RadGrid﴾﴿;
this.grid.AutoGenerateColumns = false;
this.grid.NeedDataSource += new GridNeedDataSourceEventHandler﴾OnNeedDataSource﴿;
this.grid.ItemDataBound += new GridItemEventHandler﴾grid_ItemDataBound﴿;
this.grid.DetailTableDataBind += new GridDetailTableDataBindEventHandler﴾grid_DetailTableDataBind﴿;
this.grid.AllowMultiRowEdit = true;
this.grid.AllowPaging = true;
this.grid.AllowSorting = true;
this.grid.Width = 700;
//other columns definitions ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
string gridEditColumnLinkName = "Action Column";