How to hide filter menus when no text is entered

5 posts, 1 answers
  1. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 13 Jun 2012 Link to this post


    Hi ,
    I have a scenario where i have textbox field in footer item, at grid item filter item is working fine.,
    for footer i need to disable footer option .. when click enter on footer item, filter items shows up. with focus on first column.

    Please refer the attached document for the error.

    How can i avoid this ?

    Regards,
    Akki
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 Jun 2012 Link to this post

    Hi Akki,

    This is because the filter button of the first RadGrid column turns out to be the first button rendered in the form the grid resides in. That is why it is set as the form's default (submit) button. In order to work around this, you can declare an invisible inactive button and set it to be the default one.

    ASPX:
    <form id="form1" defaultbutton="Button2" runat="server">
    <asp:Button ID="Button2" runat="server" Text="" style="display: none;" OnClientClick="return false;" />

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 13 Jun 2012 Link to this post

    Thanks Princy,
    But the grid is in Content Page. Do i need to add the Button2 in masterPage ??

    Regards,
    Akki
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Jun 2012 Link to this post

    Hello Akki,

    You can add the button in MasterPage as shown below.
    aspx:
    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
    <body>
      <form id="form1"  defaultbutton="Button2"  runat="server">
      <asp:Button ID="Button2" runat="server" Text="" style="display: none;" OnClientClick="return false;" />
    </body>

    Thanks,
    Princy.
  6. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 14 Jun 2012 Link to this post

    Thanks princy , It worked.

    If you can do one help for me ..
    I had posted one issue with use of radspell..Below is link.,

    http://www.telerik.com/community/forums/aspnet-ajax/spell/spell-check-not-happening-on-asp-text-box.aspx

    Can you have look into this ? Still i need to get the solution for above post.

    Regards,
    Akki
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017