0
我添加了Telerik GridView並將其鏈接到我的本地sql server數據庫。問題是我看不到任何添加/插入行功能,我也找不到啓用它的選項。下面是radgrid控件代碼:嚮導Telerik RadGrid中沒有添加功能
<telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False"
AllowAutomaticInserts="True"
AllowAutomaticUpdates="True"
AllowAutomaticDeletes="True" ShowStatusBar="True"
.........
或者稱爲每張圖片,選擇母版頁和標誌的選項:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True" AllowFilteringByColumn="True"
AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"
CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None" Skin="Silk" Width="987px">
<ExportSettings ExportOnlyData="True" OpenInNewWindow="True">
<Pdf AllowAdd="True" AllowCopy="True" />
</ExportSettings>
<MasterTableView autogeneratecolumns="False" datakeynames="Id" datasourceid="SqlDataSource1">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column"
HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name"
SortExpression="Name" UniqueName="Name">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Form" FilterControlAltText="Filter Form column" HeaderText="Form"
SortExpression="Form" UniqueName="Form">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Price" FilterControlAltText="Filter Price column" HeaderText="Price"
SortExpression="Price" UniqueName="Price">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Expiry" DataType="System.DateTime" FilterControlAltText="Filter Expiry
column" HeaderText="Expiry" SortExpression="Expiry" UniqueName="Expiry">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Quantity" DataType="System.Int32" FilterControlAltText="Filter Quantity
column" HeaderText="Quantity" SortExpression="Quantity" UniqueName="Quantity">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
<PagerStyle PageSizeControlType="RadComboBox" Mode="Slider"></PagerStyle>
</MasterTableView>
<PagerStyle PageSizeControlType="RadComboBox" Mode="Slider"></PagerStyle>
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
你整理了問題嗎?給我們反饋。 – FeliceM