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

Filter dropdown in childgrid

5 Answers 29 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Deepak
Top achievements
Rank 1
Deepak asked on 01 Jul 2010, 02:39 PM
Hi,

I am trying to adding a drop down for filter in my child grid,but i am facing problem in it.
Please help, is there any tutorial for the same.
I have already gone through below link.
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx

But i am getting error like "You must override Clone() for a derived grid column".

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 01 Jul 2010, 04:26 PM
Hi Deepak,

I think that the following article from the online documentation can help you configure the dropdown filters for multiple grid columns:

http://www.telerik.com/help/aspnet/grid/?grdFilteringWithDropDownList.html

Review the code snippets from the resource for further details and modify your code accordingly to extend the current filtering functionality.

For hierarchical grid you can undertake the same operations as the ColumnCreating event is fired for each table in the grid hierarchy. This event fires before a custom column is created. You can handle the event to replace or modify the instance of the column that should be created and added into the collection of column in the corresponding GridTableView.

I hope this helps.

Regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Deepak
Top achievements
Rank 1
answered on 02 Jul 2010, 01:35 PM
Hi,

I have tried in two section one in the needdatasource event but over there i am getting the same error.
"You must override Clone() for a derived grid column".
and second time i am trying at .

 Grid_DetailTableDataBind event here i am getting the dropdown but no data displaying for that column.
i have tried below mentioned code

 

Dim

 

GridColumn As New MyFilteringTemplateColumns.CustomFilterDropdown()

 

GridColumn.DataField =

 

"Language"

 

 

 

GridColumn.HeaderText = "Language"

 

 

 

e.DetailTableView.Columns.Add(GridColumn)

please help............

 

 

0
Pavlina
Telerik team
answered on 02 Jul 2010, 03:07 PM
Hi Deepak,

The proper method to implement filtering with RadComboBox for your GridBoundColumn (with DataField named 'Language') is to extend the column in a custom class as shown here and insert the dropdown instance in the SetupFilterControls() method. Then handle the SelectedIndexChanged event of the combobox and invoke the FireCommandEvent method of the grid to perform the corresponding filter action.

Give it a try and let me know how it goes.

Kind regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Deepak
Top achievements
Rank 1
answered on 06 Jul 2010, 12:03 PM

Hi,

I have tried from the given link but I m not succeeded in that.
And later I have used filter template column but in that I succeeded to populate the data with drop down but not able to filter.

In the example you have used javascript function which filters the grid.

But here I want to filter the detailtables.

function NewsIndexChanged(sender, args) {

                                                                                                 var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");

                                                        tableView.filter("Language", args.get_item().get_value(), "EqualTo");

   }

here I am not getting the tableView for the detailtables.

Do you have any readymade solution.

My problem is I want to add filter dropdown with filter template and filtering using javascript block.

0
Pavlina
Telerik team
answered on 06 Jul 2010, 04:54 PM
Hi Deepak,

Could you please send us a runnable sample via regular support ticket, illustrating your scenario and the issues you are facing? Thus I could debug it locally and find a proper resolution for you. Otherwise it would hard to determine the source of the problem based on the provided information.

Regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Deepak
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Deepak
Top achievements
Rank 1
Share this question
or