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
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
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............
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
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.
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