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

Problem with Rad Grid by using Object DataSource

1 Answer 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
MSyma
Top achievements
Rank 1
MSyma asked on 18 Sep 2012, 08:48 AM
I m getting insert event for 2 times After click GridEditCommandColumn  in rad grid .Here is my grid.

                <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server"
                    AllowAutomaticDeletes="True" 
        AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True"
        AutoGenerateColumns="False" CellSpacing="0" 
                     DataSourceID="Item" 
                    ondeletecommand="RadGrid_DeleteCommand" >
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                 <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ID"
             HorizontalAlign="NotSet" AutoGenerateColumns="False" 
                        EditMode=InPlace DataSourceID="Item" >
                        <CommandItemSettings ExportToPdfText="Export to PDF" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" 
                            Visible="True">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" 
                            Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="JobID" ColumnEditorID="GridTextBoxColumnEditor1" 
                                FilterControlAltText="Filter JobID column" HeaderText="JobID" 
                                SortExpression="JobID" UniqueName="JobID">
                                <ItemStyle Width="10%" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Description" ColumnEditorID ="GridTextBoxColumnEditor2"
                                FilterControlAltText="Filter Description column" HeaderText="Description" 
                                SortExpression="Description" UniqueName="Description">
                                <ItemStyle Width="70%" />
                            </telerik:GridBoundColumn>
                            <telerik:GridDropDownColumn DataField="UOM" DataSourceID="UOM" HeaderText="UOM" 
                                ListTextField="Display" ListValueField="ID" UniqueName="UOM" ColumnEditorID="GridDropDownColumnEditor1">
                                <ItemStyle Width="10%" />
                            </telerik:GridDropDownColumn>
                            <telerik:GridNumericColumn DataField="Quantity" DataType="System.Int32" 
                                FilterControlAltText="Filter Quantity column" HeaderText="Quantity" 
                                SortExpression="Quantity" UniqueName="Quantity" 
                                ColumnEditorID="GridNumericColumnEditor1" DefaultInsertValue="0" 
                                EmptyDataText="0">
                                <ItemStyle Width="5%" HorizontalAlign="Right" />
                            </telerik:GridNumericColumn>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton"
                                UniqueName="EditCommandColumn">
                                <ItemStyle Width="5%" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
                                ConfirmDialogType="RadWindow" ConfirmText="Delete this record?" 
                                ConfirmTitle="Delete" Text="Delete" UniqueName="DeleteColumn">
                                <ItemStyle CssClass="MyImageButton" HorizontalAlign="left"/>
                            </telerik:GridButtonColumn>
                        </Columns>
                        <EditFormSettings>
                        
                            <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" 
                                UniqueName="EditCommandColumn1" >
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>


1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 21 Sep 2012, 09:18 AM
Hi MSyma,

I reviewed the provided markup and it looks totally correct to me. Could I kindly ask you to elaborate a bit more on your scenario. Pasting the whole page markup as well as the related code behind will help us further research on the issue and do our best to provide proper solution.


Greetings,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
MSyma
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or