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

collapse one particular row

2 Answers 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mathieu
Top achievements
Rank 1
mathieu asked on 21 Nov 2012, 03:59 PM
hi 
i need to collapse one particular row but i'm not in the item data bound but in a onclick of a radbutton 

how could i do ?

thanks

2 Answers, 1 is accepted

Sort by
0
mathieu
Top achievements
Rank 1
answered on 22 Nov 2012, 01:46 AM
in fact something like this :

<NestedViewTemplate>
    <sgd:Detail runat="server" ID="Detail" Visible="false" />
</NestedViewTemplate>
<EditFormSettings EditFormType="Template">
    <FormTemplate>
        <sgd:Detail runat="server" ID="Detail" />
   </FormTemplate>
</EditFormSettings>

and i need to close the expandede rows with the call of a button inside the usercontrol (outside to ideally)

if you any clue 

thanks 
0
Eyup
Telerik team
answered on 26 Nov 2012, 11:06 AM
Hello Mathieu,

You could toggle an ExpandCollapse command either from the server:
http://www.telerik.com/help/aspnet-ajax/grid-fire-command-event-from-code.html

or from the client:
http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-firecommand.html
function buttonClicked() {
    var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
    masterTable.fireCommand("ExpandCollapse", 3); // index of the row
}

I hope this will prove helpful. Please give it a try and let me know about the result.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
mathieu
Top achievements
Rank 1
Answers by
mathieu
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or