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

Generate NewRow

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raimund
Top achievements
Rank 1
Raimund asked on 03 Jan 2011, 02:13 PM
Hello,

I tried everything, but the Grid does not show a Link to Insert a new item.
I got a SqlDataSource with automatic generated Select, Insert, Delete and Update statements.
With the Grid i can do Update and Delete without any probs, but it does not show the Insert link.

Somebody knows what i have to change manually to show the Insert Link?
This is the code of the Grid "gvUser"

    <telerik:RadGrid ID="gvUser" runat="server" AllowSorting="True" AutoGenerateColumns="False"
        AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" DataSourceID="srcGv"
        GridLines="None" Skin="Windows7" onitemcreated="gvUser_ItemCreated"
        AllowPaging="True" onupdatecommand="gvUser_UpdateCommand" AllowAutomaticInserts="true">
        <MasterTableView DataSourceID="srcGv" EditMode="InPlace" ClientDataKeyNames="pk" DataKeyNames="pk" PageSize="10" InsertItemDisplay="Top" AllowAutomaticInserts="true">
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
... Colums ...
            </Columns>
            <EditFormSettings InsertCaption="Neuer Benutzer">
                <EditColumn FilterControlAltText="Filter EditCommandColumn column" UpdateText="Anwenden" InsertText="Hinzufügen" CancelText="Abbrechen">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>

and this is the SqlDataSource

    <asp:SqlDataSource ID="srcGv" runat="server" ConnectionString="<%$ ConnectionStrings:cn%>"
        DeleteCommand= ... here is the Delete Command
        InsertCommand= ... here is the Insert Command ....
        SelectCommand= ... here is the Select Command ...
        UpdateCommand=... here is the Update Command ...
        <DeleteParameters>
... Delete Param ...
        </DeleteParameters>
        <InsertParameters>
... Insert Params ....
        </InsertParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="cboR" Name="R" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
... Update Params ...
        </UpdateParameters>
    </asp:SqlDataSource>

1 Answer, 1 is accepted

Sort by
0
Raimund
Top achievements
Rank 1
answered on 03 Jan 2011, 02:15 PM
Hi again...

... i forgot to set CommandItemDisplay ... ^^
Tags
Grid
Asked by
Raimund
Top achievements
Rank 1
Answers by
Raimund
Top achievements
Rank 1
Share this question
or