I currently have a radGrid which opens an asp FormView in the NestedViewTemplate like so:
This is perfect for viewing and editing the record, however, how do I open the FormView in InsertMode when a user clicks the Grid's command item "Add New Record" link?
I want the grids add new record command to display the form that is in the NestedViewTemplate, and change its mode to form_DUser.ChangeMode(FormViewMode.Insert)
Is this possible?
<
NestedViewTemplate
>
<
asp:Label
ID
=
"CurrentUser"
runat
=
"server"
Text='<%# Bind("user_id") %>' Visible="false"></
asp:Label
>
<
asp:SqlDataSource
ID
=
"sqlds_SelectedUser"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:M_ConnectionString %>"
SelectCommand="SELECT * FROM [d_users] WHERE ([user_id] = @user_id)">
<
SelectParameters
>
<
asp:ControlParameter
Name
=
"user_id"
Type
=
"Int32"
ControlID
=
"CurrentUser"
PropertyName
=
"Text"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
asp:FormView
ID
=
"form_DUser"
runat
=
"server"
DataKeyNames
=
"user_id"
DataSourceID
=
"sqlds_SelectedUser"
Width
=
"100%"
>
....
This is perfect for viewing and editing the record, however, how do I open the FormView in InsertMode when a user clicks the Grid's command item "Add New Record" link?
I want the grids add new record command to display the form that is in the NestedViewTemplate, and change its mode to form_DUser.ChangeMode(FormViewMode.Insert)
Is this possible?