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

headercontextmenufilter + ListTextField

1 Answer 79 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Lasly
Top achievements
Rank 1
Lasly asked on 05 Dec 2011, 01:46 PM
I have the problem Filtering By ListTextField for GridDropDownColumn
(http://www.telerik.com/help/aspnet/grid/grdfilteringbylisttextfieldforgriddropdowncolumn.html)
but i use the HeaderContextMenu.


i tryed  without  success


Can you help me?


 
switch (e.CommandName.ToLower())
           {
               case  "headercontextmenufilter":
                   Triplet headercommand = (Triplet)e.CommandArgument;
                   Pair command = (Pair)headercommand.Second;
 
                   if (headercommand.First.ToString().ToLower() == "fg")
               {
                   e.Canceled = true;
                  /// GridFilteringItem filter = (GridFilteringItem)e.Item;
                   GridHeaderItem filter= (GridHeaderItem)e.Item;

1 Answer, 1 is accepted

Sort by
0
Lasly
Top achievements
Rank 1
answered on 05 Dec 2011, 05:03 PM
I reproduced the proposed solution for the filter context menu. ( GridHeaderItem )

case "headercontextmenufilter":
                   
                   Triplet headercommand = (Triplet)e.CommandArgument;
                   Pair command = (Pair)headercommand.Second;
 
                   if (headercommand.First.ToString().ToLower() == "fg")
                   {
                        GridHeaderItem filter = (GridHeaderItem)e.Item;
 
                        ((filter["descrizione"].Controls[0]) as TextBox).Text = ((filter["fg"].Controls[0]) as TextBox).Text;
                        command.Second = "descrizione";
                        filter.FireCommandEvent("Filter", new Pair(command.First, "descrizione"));
                   }
 
                   break;

but I can not apply this solutionbecause it slows

thank you anyway

Tags
Filter
Asked by
Lasly
Top achievements
Rank 1
Answers by
Lasly
Top achievements
Rank 1
Share this question
or