New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Hide All Rows on Insert and Display the Edit Form Only
When the grid presentation area is restricted on your page you may not want to display the grid items on item insertion (as thus the control will expand its height). To hide all rows in Telerik RadGrid on item insertion and display merely the edit form for the inserted item, you need to:
-
Subscribe to the PreRender event of Telerik RadGrid
-
Verify whether RadGrid1.MasterTableView.IsItemInserted is set to True
-
Traverse the grid items and set their Visible attribute to False
ASP.NET
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server">
<MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="True" />
</telerik:RadGrid>