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

Radgrid 2nd item always in edit on page load

1 Answer 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 1
Jamie asked on 22 Jan 2016, 12:45 PM
Looking at the example here: http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultvb.aspx?show-source=true
Is there a way to not have the 2nd item in the list in edit mode/have the edit fields hidden on page load?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 Jan 2016, 11:54 AM
Hello Jamie,

Just remove the following logic which explicitly puts the item in edit mode:
Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender
    If Not IsPostBack And Me.RadGrid1.MasterTableView.Items.Count > 1 Then
        Me.RadGrid1.MasterTableView.Items(1).Edit = True
        Me.RadGrid1.MasterTableView.Rebind()
    End If
End Sub

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Jamie
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or