I designed the Master-detail grid view. But, when I run the code it always show the first row expanded. How to make all rows collapsible on load of page? Rows will be expanded when I click on expand icon.
Example followed : https://demos.telerik.com/aspnet-mvc/grid/detailtemplate
2 Answers, 1 is accepted
0
Tsvetomir
Telerik team
answered on 18 Mar 2021, 11:42 AM
Hi Deepti,
The linked demo has additional logic that opens the first detail upon loading. If you would like to prevent this on your side, remove the DataBound event:
.Events(events => events.DataBound("dataBound"))
<script>
functiondataBound() {
this.expandRow(this.tbody.find("tr.k-master-row").first()); //remove this line or the whole event
}
</script>