How can we achieve this?
5 Answers, 1 is accepted
This is not supported by Telerik Grid for ASP.NET MVC out of the box. The expand/collapse button is always shown when there is a detail row. Probably some jQuery workaround can be invented but it would be very specific to your scenario. If this is mandatory for you please provide more info about what you need. Ideally you can send us a sample running project which shows the current configuration and explain what the desired behavior should be. A screenshot would also be of help.
All the best,Atanas Korchev
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
Look at the attached screens. Let is know if its possible to achieve this?
The requested behavior can be achieved with the following script:
function removeIcons(e) { if ($("> .t-grid-content > table > tbody > .t-master-row", this).length == 1) { window.setTimeout(function () { $(".t-hierarchy-cell .t-icon").css("visibility", "hidden"); }, 1); }}The above function checks how many expandable master rows you have. It should be executed as a Grid OnLoad handler if you are using server binding, and as an OnDataBound handler if you are using client binding.
Regards,
Dimo
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
Any tweaks? Also, why do we need
window.setTimeout? You can try this which should work when the grid is not scrollable:
function removeIcons(e) { if ($(".t-master-row", this).length == 1) { $(".t-hierarchy-cell .t-icon").css("visibility", "hidden"); }}The setTimeout is probably not needed. Regards,
Atanas Korchev
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
