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

Performance

1 Answer 126 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas Kaske
Top achievements
Rank 1
Thomas Kaske asked on 16 Dec 2009, 05:09 PM
Hello,

we use Telerik in our Company. We use a lot of GridViews and here are my Questions:

1. What is the best and fastest way to bind data to a datasource. We use lists for binding. Are datasets or arrays faster? Should i use   binding sources or do they cost time?

2. I have a hierachal GridView. I dont aant to work with datasets. I work with Objects.
    I have a class for example City with some properties and a nested list of people objects.

    Now my solution is to make an relation between thos two. Each people Object has an ID of its city.

    But to bind that i have to make a new list which has alle people from all cities and then i can bind it.

    But i would like to bind it without makin the new list.

    I wolud have it like the childgrid binds to the list of people in the city.

    gridView.datasource = List<City>
    gridView.Template...[0].DataSource = here I would like to have exactlöy the nested list in city but i have a list of alle people from all cities?

How can I solve that?
Thanx Thomas
    

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 18 Dec 2009, 08:47 AM
Hi Thomas Kaske,

1) The best way for optimal binding is to create BindingList<> with your custom objects. The BindingList<> generic support notification changes and RadGridView will automatically refresh when you add/delete/reset list of items. To support also ItemChanged your custom object, e.g. City, must implement INotifyPropertyChanged interface.

2) This functionality is not supported in the current edition of RadGridView. We planned to introduce an extended hierarchy mode supporting custom objects, ORM objects, self-reference mode in the our next major release. In you scenario, you must build additional list of objects and bind them to the inner GrridViewTemplates.

All the best,
Julian Benkov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Thomas Kaske
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or