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

Filter RadGridTemplateColumn contains RadGridList

1 Answer 59 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Mohamed asked on 02 Dec 2012, 07:14 PM

I have a Telerik Grid contains a template column, this column holds a RadGridList and receives its data from StringCollection, this means that I have a column with multiple values.

I'm trying to filter this column using a combobox, I can filter such columns but with only single data, but how to filter a column contains multiple data represented by StringCollection?

I Usually use this way to filter columns

<telerik:GridBoundColumn DataField="ExperienceLevel" HeaderButtonType="TextButton" HeaderText="Experience Level" SortExpression="ExperienceLevel" UniqueName="ExperienceLevel">
                          <telerik:RadComboBox ID="RadComboBoxExperienceLevel" runat="server" AppendDataBoundItems="true" DataSourceID="SqlDataSourceExperienceLevel" DataTextField="englishName" DataValueField="ExperienceLevelID" DropDownWidth="150" OnClientSelectedIndexChanged="ExperienceLevelIndexChanged" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ExperienceLevel").CurrentFilterValue %>' Width="100">
                                  <telerik:RadComboBoxItem Text="All" Value="" />
                          <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                              <script type="text/javascript">
                                  function ExperienceLevelIndexChanged(sender, args) {
                                      var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                      tableView.filter("ExperienceLevel", args.get_item().get_value(), "EqualTo");

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 06 Dec 2012, 07:28 AM
Hello Mohamed,

So you have a RadGrid with template column where you have another RadGrid which is bound to a StringCollection? And then you need to filter by this column; not with its associated value, but with the datasource of the nested control? Is this so, or I'm missing something?

the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question