I have implemented a custom RadMenu that contains a RadCombobox to handle the
filtering for the column. The RadComboBox is working perfectly, however, I am trying
to implement the javascript filter code used with the Filter Template and haven't had
any luck. Below code gives me a "Cannot convert type 'System.Web.UI.Page' to
'Telerik.Web.UI.GridItem'" error on the var tableView.
Javascipt code located in <Body>
filtering for the column. The RadComboBox is working perfectly, however, I am trying
to implement the javascript filter code used with the Filter Template and haven't had
any luck. Below code gives me a "Cannot convert type 'System.Web.UI.Page' to
'Telerik.Web.UI.GridItem'" error on the var tableView.
Javascipt code located in <Body>
function test(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter(columnname, args.get_item().get_value(),
"EqualTo");
}
ASPX CS Code to add RadComboBox
public
class MyTemplate : ITemplate
{
#region
ITemplate Members
public void InstantiateIn(Control container)
{
RadComboBox RCB = new RadComboBox();
RCB.ID="RCB_" + column1;
RCB.AutoPostBack =
true;
RCB.DataSourceID = RadGrid2.DataSourceID;
RCB.DataTextField = column1;
RCB.DataValueField = column1;
RCB.OnClientSelectedIndexChanged =
"test";
container.Controls.Add(RCB);
}
#endregion
}
I can't figure this one out. Any ideas?