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

Grid Data Source Problem

2 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tejpartap Singh
Top achievements
Rank 1
Tejpartap Singh asked on 18 Feb 2009, 05:07 AM
HI Telerik team,

i would like to discuss the Grid data source problem with you (In case of MVC Framework).

i am supplying the list of objects to the grid as a data source. when the data source is a list of objects and object are single level then there is no prob. but when i pass the list and in list some of the objects are again a collection of objects then how to paint the grid.

example: 

List

<Activity> list;

radGrid.DataSource = list;

and Activity class is something like this

public string CustomerName { get; set; }

 

 

public string AllocatedTo { get; set; }

 

 

public string Status { get; set; }

 

 

 

public UserInfoVO RaisedBy { get; set; }

 

 

Now RaisedBy is the object of class UserInfoVO which contain following properties
string firstName;
string LastName;
string phone;

now in this case in the view page i am using 

 

<%

# Eval("Status ")%> to paint the field of the grid.

 

 

when it is for the primitive data type it display the value but how does it work for user defined classes... like i would like to print first name and phone no from UserInfoVo class.

thanks.

Regards,
Tej.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Feb 2009, 09:33 AM
Hi,

Here's a forum link that discusses on the same line as yours. Give it a try and let me know if it was helpful.

http://www.telerik.com/community/forums/aspnet-ajax/grid/binding-the-subobjects-to-the-radgrid.aspx

Thanks,
Princy
0
Bill Noble
Top achievements
Rank 1
answered on 18 Feb 2009, 11:21 AM
Thanks


Bill
Tags
Grid
Asked by
Tejpartap Singh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Bill Noble
Top achievements
Rank 1
Share this question
or