I would think that after getting the data source correct and the automatic inserts set to true, I should be able to see the "add new record" line on top of my radGrid. Unfortunately, this isn't the case. Please see below (some code truncated for length purposes): (Visual Basic syntax)
If anybody can tell me why the "add new record" doesn't show up, it would be appreciated.
Thanks,
Patrick
<telerik:RadGrid runat="server" ID="grdExtraFields" AutoGenerateColumns="false" AllowPaging="true" Width="90%" Height="400px" AllowSorting="true" DataSourceID="sqlVCK" PageSize="20" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"> <MasterTableView EditMode="InPlace" AutoGenerateColumns="false"> <Columns> <telerik:GridEditCommandColumn UniqueName="btnEdit" ButtonType="LinkButton" /> <telerik:GridTemplateColumn DataField="section" HeaderText="Section Name" UniqueName="section"> <ItemTemplate> <telerik:RadComboBox ID="cboSection" runat="server" DataSourceID="sqlSection" DataTextField="description" DataValueField="section" Width="200px" Enabled="false"> </telerik:RadComboBox> </ItemTemplate> <EditItemTemplate> <telerik:RadComboBox ID="cboSection" runat="server" DataSourceID="sqlSection" DataTextField="description" DataValueField="section" Width="200px"> </telerik:RadComboBox> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="INTERNAL_READABLE" HeaderText="Internal Name" UniqueName="internalname" /> <telerik:GridBoundColumn DataField="EXTERNAL_READABLE1" HeaderText="External Name" UniqueName="externalname" /> <telerik:GridTemplateColumn DataField="GRIDS_DATATYPE" HeaderText="Type" UniqueName="type"> <ItemTemplate> <telerik:RadComboBox ID="cboType" runat="server" selectedvalue='<%#Bind("GRIDS_DATATYPE") %>' Enabled="false"> <Items> <telerik:RadComboBoxItem Text="Label (-4)" Value="-4" /> <telerik:RadComboBoxItem Text="Label (-3)" Value="-3" /> <telerik:RadComboBoxItem Text="Key field" Value="-2" /> <telerik:RadComboBoxItem Text="System control" Value="-1" /> <telerik:RadComboBoxItem Text="Textbox" Value="1" /> <telerik:RadComboBoxItem Text="Tree" Value="4" /> <telerik:RadComboBoxItem Text="Listbox" Value="7" /> <telerik:RadComboBoxItem Text="Multi-line text" Value="9" /> <telerik:RadComboBoxItem Text="Date" Value="170" /> </Items> </telerik:RadComboBox> </ItemTemplate> <EditItemTemplate> <telerik:RadComboBox ID="cboType" runat="server" selectedvalue='<%#Bind("GRIDS_DATATYPE") %>'> <Items> <telerik:RadComboBoxItem Text="Label (-4)" Value="-4" /> <telerik:RadComboBoxItem Text="Label (-3)" Value="-3" /> <telerik:RadComboBoxItem Text="Key field" Value="-2" /> <telerik:RadComboBoxItem Text="System control" Value="-1" /> <telerik:RadComboBoxItem Text="Textbox" Value="1" /> <telerik:RadComboBoxItem Text="????" Value="4" /> <telerik:RadComboBoxItem Text="Listbox" Value="7" /> <telerik:RadComboBoxItem Text="Multi-line text" Value="9" /> <telerik:RadComboBoxItem Text="Date" Value="170" /> </Items> </telerik:RadComboBox> </EditItemTemplate> </telerik:GridTemplateColumn>... </Columns> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" /> </ClientSettings></telerik:RadGrid><asp:SqlDataSource id="sqlVCK" runat="server" ConnectionString="<%$ ConnectionStrings:iknetConnectionString %>" SelectCommand="select internal_readable, external_readable1, ... from grids where custfile = @custfile AND department = @dept AND section in (10, 13, 15, 16)" InsertCommand="INSERT INTO grids (SECTION, INTERNAL_READABLE, EXTERNAL_READABLE1, EXTERNAL_READABLE2, EXTERNAL_READABLE3, ..., GRIDWIDTH, REQUIRED) VALUES (@section, @fieldname, @fieldname, @fieldname, @fieldname, ..., -1, @required)" UpdateCommand="UPDATE grids SET internal_readable = @internal_readable, external_readable1 = @EXTERNAL_READABLE1, external_readable2 = @EXTERNAL_READABLE1, external_readable3 = @EXTERNAL_READABLE1, ..., section = @section where grids = @grids" DeleteCommand="DELETE FROM grids WHERE grids = @grids"> <SelectParameters> <asp:Parameter Name="custfile" type="Int32" /> <asp:Parameter Name="dept" Type="Int32" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="internal_readable" type="string" /> <asp:Parameter Name="EXTERNAL_READABLE1" type="string" /> <asp:Parameter Name="grids_datatype" type="Int32" />... <asp:Parameter Name="grids" type="Int32" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="section" type="Boolean" /> <asp:Parameter Name="fieldname" type="string" /> <asp:Parameter Name="type" type="Int32" />... <asp:Parameter Name="required" type="Boolean" /> </InsertParameters> <DeleteParameters> <asp:Parameter Name="grids" type="Int32" /> </DeleteParameters></asp:SqlDataSource>If anybody can tell me why the "add new record" doesn't show up, it would be appreciated.
Thanks,
Patrick