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

[Solved] CardView with editmode=inplace

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AnaptysBio
Top achievements
Rank 1
AnaptysBio asked on 07 Dec 2009, 11:25 PM

Hello,
I have a CardView grid and would like to use in-place editing. In this example nulls are returned to the database rather than the bound values. I can get this to work with editmode in popup or editform but in-place editing would be better. Any thoughts?
 

 
<telerik:RadGridID="RadGrid1"runat="server"DataSourceID="SqlDataSource1" 
GridLines="None">  
<ClientSettings> 
<SelectingAllowRowSelect="true"/>  
</ClientSettings> 
<MasterTableViewAllowPaging="true"DataKeyNames="ID"  
PageSize="1"ShowHeader="False"CommandItemDisplay="Top"TableLayout="Fixed"  
AllowAutomaticInserts="true"AllowAutomaticUpdates="true"EditMode="InPlace">  
<PagerStyleMode="NumericPages"ShowPagerText="False"></PagerStyle>  
<CommandItemTemplate> 
<div> 
<table> 
<tr> 
<td>Docket</td> 
<td><asp:LinkButtonID="LinkButton2"runat="server"CommandName="EditSelected"CssClass="hide4print"><imgstyleimgstyle="border:0px;vertical-align:middle;"alt=""src="Images/editItem.gif"/>EditDocket</asp:LinkButton></td>  
<td><asp:LinkButtonID="LinkButton1"runat="server"CommandName="InitInsert"CssClass="hide4print"><imgstyleimgstyle="border:0px;vertical-align:middle;"alt=""src="Images/newItem.gif"/>AddNewDocket</asp:LinkButton></td>  
</tr> 
</table> 
</div> 
</CommandItemTemplate> 
<ItemTemplate> 
<table> 
<tr> 
<td><asp:LabelID="Label1"runat="server"Text="ID"></asp:Label></td>  
<td><asp:LabelID="Label2"runat="server"Text='<%#Eval("ID")%>'></asp:Label></td>  
</tr> 
<tr> 
<td><asp:LabelID="Label3"runat="server"Text="ID"></asp:Label></td>  
<td><asp:LabelID="Label4"runat="server"Text='<%#Eval("COMPANYNAME")%>'></asp:Label></td>  
</tr> 
<tr> 
<td><asp:LabelID="Label5"runat="server"Text="ID"></asp:Label></td>  
<td><asp:LabelID="Label6"runat="server"Text='<%#Eval("CONTACTNAME")%>'></asp:Label></td>  
</tr> 
</table> 
</ItemTemplate> 
<EditItemTemplate> 
<table> 
<tr> 
<td><asp:LabelID="Label1"runat="server"Text="ID"></asp:Label></td>  
<td><asp:LabelID="Label2"runat="server"Text='<%#Eval("ID")%>'></asp:Label></td>  
</tr> 
<tr> 
<td><asp:LabelID="Label3"runat="server"Text="Company"></asp:Label></td>  
<td><asp:TextBoxID="Textbox1"runat="server"Text='<%#Bind("COMPANYNAME")%>'/></td> 
</tr> 
<tr> 
<td><asp:LabelID="Label5"runat="server"Text="Contact"></asp:Label></td>  
<td><asp:TextBoxID="Textbox2"runat="server"Text='<%#Bind("CONTACTNAME")%>'/></td> 
</tr> 
<tr> 
<td> 
<asp:ButtonID="btnUpdate"Text='<%#IIf((TypeOf(Container)isGridEditFormInsertItem),"Insert","Update")%>'  
runat="server"CommandName='<%#IIf((TypeOf(Container)isGridEditFormInsertItem),"PerformInsert","Update")%>'> 
</asp:Button>&nbsp;  
<asp:ButtonID="btnCancel"Text="Cancel"runat="server"CausesValidation="False"  
CommandName="Cancel">  
</asp:Button> 
</td> 
</tr> 
</table> 
</EditItemTemplate> 
</MasterTableView> 
</telerik:RadGrid> 
 

 

 

 

Thank you.

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 10 Dec 2009, 11:41 AM
Hello StHubbins,

Unfortunately this known issue with global EditItemTemplate and extracting the values and we will do our best to have it fix as soon as possible. Currently you must manually extract the values from the item.
For your convenience I am attaching sample project demonstrating one possible approach to attain this functionality.

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
AnaptysBio
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or