filtering +combobox with checkboxes

3 posts, 0 answers
  1. Łukasz Kuryło
    Łukasz Kuryło avatar
    24 posts
    Member since:
    Jan 2010

    Posted 19 Feb 2010 Link to this post

    Hi all.
    I have a column where I have only three possible values. I want to create a filter column with checkboxes, when I can choose one (or more) of them. I have a radgrid populated using webservice+js, so I want to do it in pure js. For filtering other columns I using a dynamic linq. How can I do that?
  2. Łukasz Kuryło
    Łukasz Kuryło avatar
    24 posts
    Member since:
    Jan 2010

    Posted 22 Feb 2010 Link to this post

    Ok, I have created this radcombobox with checkboxes

    <telerik:GridBoundColumn    DataField="Producer"  
                                                        <telerik:RadComboBox    ID="rcbProducerFilter"     
                                                                                EmptyMessage="All Types"  
                                                                                <WebServiceSettings Method="GetProducers" Path="SampleData.asmx" /> 
                                                        <div id="rcbProducerFilterTemplatePanel" class="templateRadComboBox">                                  
                                                            <input name="chk1" type="checkbox" onclick="MyGrid.OnChange()"/> 

    MyGrid.RadComboBoxTemplateItemDataBound = function(sender, eventArgs) 
        var item = eventArgs.get_item(); 
        var dataItem = eventArgs.get_dataItem(); 
        dataItem.Index = item.get_index(); 
        var template = new Sys.UI.Template($get("rcbProducerFilterTemplatePanel")); 
        template.instantiateIn(item.get_element(), dataItem); 
    But I have a problem, how to bound the selected values to the build-in filtering?
    I would like to use
    var filterExpressions = masterTable.get_filterExpressions();
        filter = filterExpressions.toDynamicLinq();
    and get these values in that way.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tsvetoslav
    Tsvetoslav avatar
    1823 posts

    Posted 24 Feb 2010 Link to this post

    Hello Łukasz,

    If you are binding the grid through a web-service (client-side databinding) you cannot use the build-in filtering as it is server-side based. What you need to do is to intercept the selected-index changed event of the combo or any other event that you need, issue a call to the web service with information on the filtering criteria and rebind the grid.

    Our online example on client-side databinding uses the same implementation approach (although it appears to be using the built-in filtering, actually it does not - the OnCommand event is what does the trick):

    I hope this helps. 

    All the best,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top