I have set AllowAutomaticInsert to True but i still don't see any insert link.
Is there any tutorial that would guide me through for a newbie? I follow the online demo and i still don't get it. I would like to have a inplace insert. Thanks
8 Answers, 1 is accepted

Hi Lui Nai Wah,
Try setting the CommandItemDisplay property and the EditMode property of your RadGrid. Check out the code snippet below:
ASPX:
<MasterTableView CommandItemDisplay="Top" EditMode="InPlace"> |
</MasterTableView> |
Thanks
Princy.

Ok it works fine, but it seems that the primary key field is not enable for insert. All other fields show a textbox, but not primary key. My DB key is a nvarchar. How to enable it? Thanks

Try adding one GridBoundColumn with the DataField set as the PrimaryKey Field. Sending your aspx will be more good.
Thanks
Shinu.

This is my ASPX code:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateEditColumn="True"
DataSourceID="sdsROM" GridLines="None" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" OnItemInserted="RadGrid1_ItemInserted"
DataMember="DefaultView" >
<
MasterTableView EditMode="InPlace" CommandItemDisplay="Top" AutoGenerateColumns="False" DataKeyNames="ROMID" DataSourceID="sdsROM"
DataMember="DefaultView">
<
RowIndicatorColumn Visible="False">
<
HeaderStyle Width="20px"></HeaderStyle>
</
RowIndicatorColumn>
<
ExpandCollapseColumn Visible="False" Resizable="False">
<
HeaderStyle Width="20px"></HeaderStyle>
</
ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ROMID" DataType="System.String"
HeaderText="ROM ID" SortExpression="ROMID" UniqueName="ROMID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ROMSize" DataType="System.Int16"
HeaderText="ROM Size" SortExpression="ROMSize" UniqueName="ROMSize">
</telerik:GridBoundColumn>
</Columns>
<
EditFormSettings>
<
PopUpSettings ScrollBars="None"></PopUpSettings>
</
EditFormSettings>
</
MasterTableView>
<ClientSettings EnableRowHoverStyle="True">
</ClientSettings>
</telerik:RadGrid>
OK both show textbox when click on Add New Record, but when i click insert, it gives me this error:
Unable to cast object of type 'Telerik.Web.UI.GridDataInsertItem' to type 'Telerik.Web.UI.GridEditFormInsertItem'
Strange enough that it actually did insert a record into the DB. How do I not see this error? thanks

I have found the problem. Thanks

Could you please send your code behind also.
Shinu.

Am Sorry, I meant i found the solution. Thanks

<
MasterTableView
... >
<
CommandItemSettings
ShowAddNewRecordButton
=
"true"
></
CommandItemSettings
>