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

[Solved] Google-Like filtering Radcombobox ItemsRequested is triggering RadGrid needDataSource event.

4 Answers 249 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Morgan
Top achievements
Rank 1
Morgan asked on 24 Apr 2008, 07:39 PM
Hello,

I have implemented the Google-like filtering that is demonstrated here.

The problem is that the itemsRequested events of the RadComboBoxes are triggering the RadGrid.NeedDataSource event. 

I usually use the following logic to prevent rebinding the RadGrid :

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
        If Not RadComboBox1.IsCallBack Then 
            ' rebind radgrid 
        End If 
End Sub 

I would like to do something similar in this case, but I do not know how to get a reference to the RadComboBoxes.

Thanks

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Apr 2008, 04:18 AM
Hi Morgan,

Go through the following help article and see how the Filtering Item is being accessed in the code behind.

Setting filter textbox dimensions/changing default filter image

Thanks
Shinu.
0
Morgan
Top achievements
Rank 1
answered on 25 Apr 2008, 04:49 PM
Thanks for your reply Shinu.

Turns out that the itemsRequested event of the radComboBoxes trigger the page_load event. I need to avoid the execution of code inside the page_load event.

How can I get a reference to the radcomboboxes from inside the Page_load event so I can check RadComboBox.IsCallBack?

Thanks again


0
Vladimir
Top achievements
Rank 1
answered on 26 Apr 2008, 07:17 AM
Hi Morgan,

Please check this thread for more info on how to use alternative technique to find if the combo is requesting the server:

http://www.telerik.com/community/forums/thread/b311D-dcadm.aspx
Tags
Grid
Asked by
Morgan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Morgan
Top achievements
Rank 1
Vladimir
Top achievements
Rank 1
Share this question
or