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

[Solved] Dynamically Bind items to a (child) grid upon clicking toggle button

2 Answers 174 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
kedarnath
Top achievements
Rank 1
kedarnath asked on 16 Jun 2011, 09:03 AM
hi team telerik..

Thanks for your five star support...


Coming to my scenario,

I Search a customer by his name and bind the seach results to a GridView (with a toggle button to each row)

And now my requirement is when i click on the toogle button of a  (Customer) row,I need to fetch the orders of that customer dynamically by getting the selected customer and sending the customer id to my web service...

By the way i am using Asp.net Webservices in my application.After i get the orders of that customer i want to bind them to  Child grid associated with the selected customer row.

I tried this earlier but the  ordersResults are not displayed..

Colud you please assist me in this regard..A sample project will do the very best help.

2 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 22 Jun 2011, 08:14 AM
Hi kedarnath,

In order to accomplish this task, I would advise you to implement your own ToggleButton column that inherits from GridViewToggleRowDetailsColumn, so that you would be able to execute your custom logic on the respective button click. Therefore the fetched data could be displayed in the row's details. 

Kind regards,
Ivan Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
kedarnath
Top achievements
Rank 1
answered on 24 Jun 2011, 07:17 AM
Dear Ivan,

I have gone through some sample codes which  implement  ToggleButton column that inherits from GridViewToggleRowDetailsColumn ,but I couldnt find anything relevent to my requirement.In all the samples upon clicking the toggle button the data which is displayed in the row details is preloaded along with the master details grid...

As you are  aware that i need to display the data in the rowdetails fetching it from the webservice..

It would have helped me if their exists an event which can be fired upon clicking the toggle button so that i can get the clicked record details send it to server and retrieve required records and bind them back.

Please Give out a sample code on what you have suggested.
Tags
GridView
Asked by
kedarnath
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
kedarnath
Top achievements
Rank 1
Share this question
or