8 Answers, 1 is accepted
The only difference that I have from your code is that I have AutoGenerateColumns="False"
Here's my tag :
telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="False" AllowFilteringByColumn="True"
AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource5"
GridLines="None" PageSize="30" ShowGroupPanel="True" Skin="Telerik" ShowStatusBar="True"
Width="100%" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
I could also use EditMode="InPlace"
The question is if I can do it in edit form mode.
I have another problem too.
How can I add an insert button?
in the MastertableView tag.
Try setting the ReadOnly property of this GridBoundColumn to true. I think this can help.
The only thing I have not managed to do yet is to program properly the insert record form.
There is a building_id column that is identity field in the database so the user should not be able to insert a number in it because the database add a number automatically.
I also want to code the insert form so that it enters automatically the customer_id in the hidden column.
I get this id in the page code behind file with the following code :
I modified the previous example to illustrate the needed functionality.
CategoryID is auto-generated by the database (read-only)
CategoryName is modified in code-behind (read-only)
Description is editable by the user
Hope this helps.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.