It 's simple, I only show custom edit form from web user control ( not need to bind data ). Ex: each User, I want to show a picture from picture.acsx when I click on row.
I had insert
But it doesn't work. What 's wrong ??? or I missed anything ??? I had read:
+ http://www.telerik.com/help/aspnet-ajax/grdcustomeditforms.html
+http://www.telerik.com/help/aspnet-ajax/grddifferenteditformsoneditandinsert.html
and demo http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
But I don't still understand . Because I don't need bind data from grid to webusercontrol. Thanks a lot !!!
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" DataSourceID="ObjectDataSource1" GridLines="None" Skin="Black" AllowMultiRowSelection="True" onitemcommand="RadGrid1_ItemCommand" AutoGenerateEditColumn="True" ShowStatusBar="True" > <MasterTableView DataSourceID ="ObjectDataSource1" ><EditFormSettings UserControlName="picture.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings></MasterTableView> <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="true"> </ClientSettings></telerik:RadGrid><EditFormSettings UserControlName="picture.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings>
both
protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) { e.Item.OwnerTableView.IsItemInserted = false; e.Item.OwnerTableView.EditFormSettings.UserControlName = "picture.ascx"; }+ http://www.telerik.com/help/aspnet-ajax/grdcustomeditforms.html
+http://www.telerik.com/help/aspnet-ajax/grddifferenteditformsoneditandinsert.html
and demo http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
But I don't still understand . Because I don't need bind data from grid to webusercontrol. Thanks a lot !!!