Hello,
I'm using filtering on my grid. When the user selects a filter the "Item_Command" event is triggered where I can retrieve the Filter pair from the command argument. From this argument I can get the "filterPair.first", "filterPair.second", ..etc. Using this approach I can get access to the column name that the user is filtering, but I need the associated Column ID. Is it possible to associate more data with this filter or command argument? Maybe I could add an attribute to the filter Textbox when the filter is created, then read it on ItemCommand?
Please let me know if you have suggestions on the best approach.
I'm using filtering on my grid. When the user selects a filter the "Item_Command" event is triggered where I can retrieve the Filter pair from the command argument. From this argument I can get the "filterPair.first", "filterPair.second", ..etc. Using this approach I can get access to the column name that the user is filtering, but I need the associated Column ID. Is it possible to associate more data with this filter or command argument? Maybe I could add an attribute to the filter Textbox when the filter is created, then read it on ItemCommand?
Please let me know if you have suggestions on the best approach.
protected void grdSummary_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.FilterCommandName)
{
Pair filterPair = (Pair)e.CommandArgument;
string strOperator = filterPair.First; // Starts With, ..etc
string strColumn = filterPair.Second; // Column Filtering On
string searchValue = ((TextBox)(e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0]).Text;
string columnId = ??