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

Double click edit

0 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 03 Aug 2012, 02:43 PM
I have seen the tutorials that allow for this to happen.  Mine is a slightly different request.

I have a grid and I need to open a radwindow on double click of a row.  This I have working.  The problem I am having is populating the form with data.
This is my grid
<telerik:RadGrid ID="gvHelpdesk" runat="server" OnNeedDataSource="gvHelpdesk_NeedDataSource"
                AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0"
                GridLines="None">
                <MasterTableView DataKeyNames="HelpdeskId">
                    <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="TicketNumber" FilterControlAltText="Filter ticketnumber column"
                            HeaderText="Ticket No" UniqueName="ticketnumber">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="AssetType" FilterControlAltText="Filter assetnumber column"
                            HeaderText="Asset No" UniqueName="assetnumber">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DateLogged" FilterControlAltText="Filter datelogged column"
                            HeaderText="Date Logged" UniqueName="datelogged">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="AssignedEmployee" FilterControlAltText="Filter AssignedEmployee column"
                            HeaderText="Assigned" UniqueName="AssignedEmployee">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
               <ClientSettings>
                <Selecting AllowRowSelect="true" />
                <ClientEvents OnRowDblClick="RowDblClick" />
                <ClientEvents OnRowClick="RowClick" />
            </ClientSettings>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
this is my JS
function UpdateHelpdesk(helpdeskid) {
            var oWnd = $find("<%=UpdateHelpdesk.ClientID%>");
            oWnd.setUrl(oWnd.get_navigateUrl());
            oWnd.show();
        };
 
        function RowDblClick(sender, eventArgs) {
 
            UpdateHelpdesk(eventArgs.getDataKeyValue("HelpdeskId"));
        }
This is the code behind that calls in a Helpdesk ticket object filled with a sproc
protected void UpdateHelpdesk_Load(object sender, EventArgs e)
        {
            UpdateHelpdesk.DataBind();
        }
 
        protected void UpdateHelpdesk_DataBinding(object sender, EventArgs e)
        {
            if (Request.QueryString["HelpdeskId"] != null)
            {
                HelpdeskTicket ticket = PageAccess.GetHelpdeskTicketByHelpdeskId(Request.QueryString["HelpdeskId"]);
                txtUpdateEngineerNotes.Text = ticket.HelpdeskNotes;
            }
        }

I would be most grateful if someone could point me in the right direction.  I don't really want to have an external window based on another page.  Ideally I would like to to get the ID from the row double clicked then open the window that also resides on the same page then populate the window on load.

Is this possible

Many thanks

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Simon
Top achievements
Rank 1
Share this question
or