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

Declarative binding to multiple keys?

1 Answer 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Effendi
Top achievements
Rank 1
Effendi asked on 08 Dec 2010, 04:46 AM
I have a form which user enters a main Sales Order number as a "main key". This key is used to fetch data and display it on a gridview. In the same form, users can enter multiple other keys. This is when a customer has multiple sales order associated with a project.

1. Can I popolulate the data in the gridview in multiple key?
2. If this can be done only programatically, how to I keep appending the dataset on every data fetch before binding it to the grid?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 13 Dec 2010, 10:39 AM
Hello Effendi,

To achieve the desired functionality you could try using the Advanced Data-Binding of the RadGrid. Into the NeedDataSource event you could set the DataSource of the RadGrid to the DataTable which contains the filtered data. When users apply new search criteria and add additional key you could build a new DataTable which contains new filtered data(by multiple keys) from database.
Generally the RadGrid could be bound to:
  • DataSet, DataTable, or DataView
  • Array of DataRow
  • Any object collection that implements the IListSource, IList, IEnumerable, or ICustomTypeDescriptor interface.
So in your case you need to get data from the database by multiple keys and store it into one of the described containers.

Please give it try and let me know if you experience any problems.

Greetings,
Radoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Effendi
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or