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

Enable filtering for GridButtonColumn in RadGrid

7 Answers 194 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gayatri
Top achievements
Rank 1
Gayatri asked on 20 Mar 2009, 08:51 AM
Hi
    I am using Rad Grid in my application. I am adding the columns to the grid at the runtime. I have filtering enabled for all the columns except a gridbutton column . How to enable filtering and sorting for the column. Also i have set the AllowFilteringByColumn to true. Please help me out in this issue.

Thanks
Gayatri

7 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Mar 2009, 10:08 AM
Hi Gayathri,

You can refer the following code library submission which explains how to implement Filtering and Sorting with GridButtonColumn.
Filtering and sorting for GridButtonColumn

Regards
Shinu.
0
Gayatri
Top achievements
Rank 1
answered on 20 Mar 2009, 10:28 AM
hi

    i am unable to open the link you have provided. i got page was not found error. please help.

thanks
Gayatri
0
Shinu
Top achievements
Rank 2
answered on 20 Mar 2009, 10:36 AM
HI Gayathri,

Here is the valid link. Plaese check out this.
Filtering and sorting for GridButtonColumn

Regards
Shinu
0
Gayatri
Top achievements
Rank 1
answered on 21 Mar 2009, 07:35 AM
Thanks a lot. It works...
0
Manuel Ajoy
Top achievements
Rank 1
answered on 20 May 2010, 10:44 PM

Hello,

I have a static grid with dynamically created columns.  I followed the recommendation in www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html under the "Create Telerik RadGrid statically, but add its structure dynamically." section to do this.

So far, I have a working grid with several dynamically created bound columns as well as a GridButtonColumn (without Filtering and Sorting).  This grid is currently using ajax and generating successfull asynchronous postbacks on Refresh/sorting/filtering events.

However, when I tried converting to a GridButtonColumnWithFilteringAndSorting, no asynchronous autopostback occurs even though I have the AutoPostBackOnFilter set to true. 

Moreover, if I click on the filtering image and choose the Contains filtering function on the GridButtonColumnWithFilteringAndSorting I get a javascript error that says:

Sys.WebForms.PageRequestManagerServerErrorException: Cannot create column with the specified type name: GridButtonColumnWithFilteringAndSorting.

I am not really sure what my problem is so any help on this matter would be greatly appreciated.

 

Thank you in advance,

Manuel

0
Manuel Ajoy
Top achievements
Rank 1
answered on 20 May 2010, 11:40 PM
Hello,

While looking at other forums I found out that a partial solution to my problem was to set the MasterTableView's EnableColumnsViewState property to false.  I tried this and I no longer get the javascript error mentioned above.  Filtering works with the GridButtonColumnWithFilteringAndSorting if I click on the filtering image and select any of the filtering functions.

However, one of my application requirements includes firing the filtering command (i.e.: generating an asynchronous postback) whenever the user presses the [ENTER] or [TAB] key while inside the filtering textbox.

Is there a way to accomplish this using the GridButtonColumnWithFilteringAndSorting column?

Manuel



0
Prangadj
Top achievements
Rank 1
answered on 21 May 2010, 10:55 AM
Try to implement filtering on [Enter] press as for the textbox in command item on this sample. Same can probably be done on TAB key if you listen for the TAB keyCode inside the javascript method.

Prangadj
Tags
Grid
Asked by
Gayatri
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Gayatri
Top achievements
Rank 1
Manuel Ajoy
Top achievements
Rank 1
Prangadj
Top achievements
Rank 1
Share this question
or