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

How to hide filter menus when no text is entered

4 Answers 73 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Akki
Top achievements
Rank 1
Akki asked on 13 Jun 2012, 09:47 AM

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

4 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 13 Jun 2012, 11:03 AM
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.
0
Akki
Top achievements
Rank 1
answered on 13 Jun 2012, 11:19 AM
Thanks Princy,
But the grid is in Content Page. Do i need to add the Button2 in masterPage ??

Regards,
Akki
0
Princy
Top achievements
Rank 2
answered on 14 Jun 2012, 05:31 AM
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.
0
Akki
Top achievements
Rank 1
answered on 14 Jun 2012, 08:41 AM
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
Tags
Filter
Asked by
Akki
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Akki
Top achievements
Rank 1
Share this question
or