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

Row Deleting Events problem

4 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 12 Jan 2010, 09:20 AM
I have code as below :


 <telerik:RadGrid ID="RadGrid1" AllowFilteringByColumn="false" runat="server" GridLines="None"
                                                AllowPaging="true" AllowSorting="true" Width="100%" AutoGenerateColumns="false"
                                                EnableEmbeddedSkins="false">
                                                <ClientSettings EnableRowHoverStyle="true">
                                                    <Selecting AllowRowSelect="true" />
                                                    <Scrolling AllowScroll="true" UseStaticHeaders="True" SaveScrollPosition="True">
                                                    </Scrolling>                                                     
                                                    <ClientEvents OnRowSelected="rowSelected" OnCommand="RadGrid1_Command" OnRowDeleted="RowDeleted"  OnRowDeleting="RowDeleting" />
                                                </ClientSettings>
                                                <MasterTableView CssClass="RadGrid_Web20" PagerStyle-Mode="NumericPages" ClientDataKeyNames="Customer_Contact_Id">
                                                    <Columns>
                                                        <telerik:GridBoundColumn SortExpression="Contact_Type" DataField="Contact_Type" HeaderText="Contact Type"
                                                            UniqueName="Contact_Type" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="Contact_Name" DataField="Contact_Name" HeaderText="Contact Name"
                                                            UniqueName="Contact_Name" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="Telephone" DataField="Telephone" HeaderText="Telephone"
                                                            UniqueName="Telephone" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridHyperLinkColumn ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"
                                                            DataNavigateUrlFormatString="mailto:{0}" DataNavigateUrlFields="Email" SortExpression="Email"
                                                            DataTextField="Email" HeaderText="Contact Email" ItemStyle-ForeColor="Blue">
                                                        </telerik:GridHyperLinkColumn>
                                                        <telerik:GridBoundColumn SortExpression="Email" DataField="Email" HeaderText="Contact Email"
                                                            UniqueName="MainEmail" Display="false" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="ContactId" DataField="ContactId" HeaderText="ContactId"
                                                            UniqueName="ContactId" Display="false" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="ContactTypeId" DataField="ContactTypeId"
                                                            HeaderText="ContactTypeId" UniqueName="ContactTypeId" Display="false" ItemStyle-HorizontalAlign="Left"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="Customer_Code" DataField="Customer_Code"
                                                            HeaderText="Customer_Code" Visible="false" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="Customer_Contact_Id" DataField="Customer_Contact_Id"
                                                            UniqueName="Customer_Contact_Id" HeaderText="Customer_Contact_Id" Display="false"
                                                            ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridClientDeleteColumn ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this row?"
                                                            HeaderStyle-Width="35px" ButtonType="ImageButton" ImageUrl="../Images/Delete.gif"
                                                            CommandName="Delete" />
                                                    </Columns>
                                                </MasterTableView>
                                            </telerik:RadGrid>


But previosly  OnRowDeleted="RowDeleted"  OnRowDeleting="RowDeleting" clinet events are getting fired but now 
in latest version of DDL its not working and i want delete button to diplay for each and every row.


It was wroking fine with telerik trial version dll but with latest version this events are not firing.

4 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 12 Jan 2010, 03:04 PM
Hi John,

When you have an event handler attached to the OnCommand event, the only client event that will be raised is just the OnCommand one. Therefore, you need to remove the OnCommand event handler and move its client logic to the OnRowDeleting and OnRowDeleted event handlers.

I hope this helps.

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John
Top achievements
Rank 1
answered on 15 Jan 2010, 06:26 AM
i had removed OnCommand event and replaced by SqlDataSource but i have added logic in OnCommand to bind the grid 
by calling webServcie function with parameters and RowDeleting and RowDeleted events are firing now  .
But i need OnCommand event since i need to call WebService fucntion with parameters
or wht will be another way to implement it.

Note : but the previous code was workiing in trial version but in new license dll its creating problem.

Pls provide me convininet solution for this.
0
Tsvetoslav
Telerik team
answered on 15 Jan 2010, 02:05 PM
Hi John,

I have passed this issue to our development team - they will shortly address it. Please, stand by for an update on it - we should get back with more information no later than the beginning of next week.

Kind regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tsvetoslav
Telerik team
answered on 18 Jan 2010, 03:56 PM
Hello John,

I am glad to inform you that the issue has already been addressed and teh fix will be available in the next latest internal build.

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
John
Top achievements
Rank 1
Share this question
or