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

client side event to open popup

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 23 Oct 2008, 02:46 AM
Hi,

I have a Grid, have client event row edit and item created event.
when user select the row in client side, 
it will popup a summary window. 
when user click edit by click the edit link, it will popup another edit window. 
however, it will popup the summary window.
And I don't want to open the sumamry window when user click edit link.
How to do that? please hlep.

Regards,

Paul

test.aspx

                            <telerik:RadGrid ID="RadGrid1"
                                AllowMultiRowSelection="true"
                                AllowMultiRowEdit="true"
                                Skin="WebBlue" runat="server"
                                AllowAutomaticDeletes="True"
                                AllowAutomaticInserts="True"
                                Width="97%" PageSize="15"
                                AllowAutomaticUpdates="True"
                                AllowPaging="True"
                                AutoGenerateColumns="False"
                                ShowStatusBar="false"    
                                AllowSorting="true"
                                EnableAJAX="true"
                                EnableAJAXLoadingTemplate="true"
                                AllowFilteringByColumn="true"
                                LoadingTemplateTransparency="50"
                                OnItemCreated="RadGrid1_ItemCreated"
                                OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged"
                                OnNeedDataSource="RadGrid1_NeedDataSource">
                            <ClientSettings AllowKeyboardNavigation="true"
                                EnablePostBackOnRowClick="false">
                                <Selecting AllowRowSelect="true" />
                                <ClientEvents OnRowSelected="RowSelected" />
                            </ClientSettings>
....
                function RowSelected(sender, args) {
                    window.open("propertyDetailsPopup.aspx?PropertyID=" + args.getDataKeyValue("Property_ID"), 'propertydetails', 'width=900, height=700');                
                }

----------------
test.cs

       if (e.Item is GridDataItem)
        {
            HyperLink editLink = e.Item.FindControl("EditLink") as HyperLink;
            editLink.Attributes["href"] = "#";
            editLink.Attributes["onclick"] = string.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Property_ID"], e.Item.ItemIndex);
        }


1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 27 Oct 2008, 10:43 AM
Hi Paul,

I tested the setup, and a separate action should be executed on clicking the edit link. Attached to this message, is the sample I used for testing.
Take a look at it and let me know if I am leaving something out.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or