RadGrid and RowClick

Thread is closed for posting
4 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 29 Oct 2009 Link to this post

    Hello,

    I have a RadGrid:

    <tel:RadGrid ID="MG" runat="server">
        <MasterTableView DataKeyNames="Key" AutoGenerateColumns="false"
            Width="450px">
            <Columns>
                <tel:GridTemplateColumn HeaderText="Subject">
                    <ItemTemplate>
                        <a href='<%# Url.Action("Select", "Messages", new { message = DataBinder.Eval(Container.DataItem, "Key") }) %>'><%# Eval("Subject") %></a>
                    </ItemTemplate>
                </tel:GridTemplateColumn>
                <tel:GridBoundColumn HeaderText="Subject" DataField="Subject" />
                <tel:GridBoundColumn HeaderText="Sent" DataField="CreatedDate" DataFormatString="{0:MM/dd/yyyy}" />
                <tel:GridBoundColumn HeaderText="Last Reply" DataField="LastReply" />
                <tel:GridBoundColumn HeaderText="Reply Date" DataField="ReplyDate" />
            </Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
            <ClientEvents OnRowClick="MG_RowClick" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
    </tel:RadGrid>

    The MG_RowClick event never fires in my MVC view.  The script is in the same place as my MVC view...   SelectedIndexChanged doesn't fire either.

    How do I get that to work?

    Thanks.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 04 Nov 2009 Link to this post

    Hello Brian,

    Please try to use RadScriptManager instead of ScriptManager control.

    Sincerely yours,
    Georgi Krustev
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 04 Nov 2009 Link to this post

    Hello,

    I am using the RadScriptManager only.  I got a post back about defining the RadScriptManager after all controls, so I'll try that and see if it alleviates it.

    Brian
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 06 Nov 2009 Link to this post

    Hello Brian,

    Please review the attached test project which implements the suggested approach.

    Best wishes,
    Georgi Krustev
    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.
Back to Top