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

[Solved] google suggest style filtering

4 Answers 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
n00b
Top achievements
Rank 1
n00b asked on 01 Jun 2008, 04:04 PM
Hello guys

I'm new to RadGrid and to dotnet technologoy,
I tried implementing "google suggest" style filtering in a new website I've created,
I tried following your article but I didn't understand, what does it mean to extend the default GridBoundColumn?
how do I embed RadComboBox inside the filtering cell

Thanks alot.

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Jun 2008, 05:10 AM
Hi,

This is how the RadComboBox is embedded inside the filtering cell as shown in the KBarticle.

CS:
protected override void SetupFilterControls(TableCell cell)    
   {    
     base.SetupFilterControls(cell);    
     cell.Controls.RemoveAt(0);    
     RadComboBox combo = new RadComboBox();    
     combo.ID = ("RadComboBox1" + this.DataField);    
     combo.ShowToggleImage = false;    
     combo.Skin = "WindowsXP";    
     combo.EnableLoadOnDemand = true;    
     combo.AutoPostBack = true;    
     combo.MarkFirstMatch = true;    
     combo.Height = Unit.Pixel(100);    
     combo.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(this.list_ItemsRequested);    
     combo.SelectedIndexChanged += new Telerik.WebControls.RadComboBoxSelectedIndexChangedEventHandler(this.list_SelectedIndexChanged);    
     cell.Controls.AddAt(0, combo);    
     cell.Controls.RemoveAt(1);    
   }    

You can also refer the following demo link.
Google-like Filtering

Shinu.
0
n00b
Top achievements
Rank 1
answered on 02 Jun 2008, 08:01 AM
Thanks for your answer,
I attached the file "MyCustomFilteringColumn.cs" to my project,
when I try to compile it says:

Error 1 The type or namespace name 'WebControls' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)

Error 2 The type or namespace name 'GridBoundColumn' could not be found (are you missing a using directive or an assembly reference?)

Error 3 The type or namespace name 'RadComboBoxItemsRequestedEventArgs' could not be found (are you missing a using directive or an assembly reference?)

What reference is missing?
0
Princy
Top achievements
Rank 2
answered on 02 Jun 2008, 09:34 AM
Hi Mayrun,

Can you try adding the following NameSpace:

CS:
using Telerik.Web.UI; 


Princy.
0
n00b
Top achievements
Rank 1
answered on 02 Jun 2008, 10:01 AM
Yes I tried that.
In fact, I replaced Telerik.WebControls with Telerik.Web.Ui in the whole page.

Now I'm presented with:

Error 1 The type '_Default' already contains a definition for 'RadGrid1'
Tags
Grid
Asked by
n00b
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
n00b
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or