or
<telerik:RadGrid ID="TicketsGrid" runat="server" EnableEmbeddedSkins="false" AllowPaging="True" PageSize="20" AllowFilteringByColumn="True" AllowSorting="True" ShowGroupPanel="True" ClientSettings-ClientEvents-OnRowClick="gridClick" EnableHeaderContextFilterMenu="True" EnableHeaderContextMenu="True" GridLines="None" oncolumncreated="rgTicketsGrid_ColumnCreated" ondatabound="rgTicketsGrid_DataBound" ongroupschanging="rgTicketsGrid_GroupsChanging" onsortcommand="rgTicketsGrid_SortCommand" onpageindexchanged="rgTicketsGrid_PageIndexChanged" onpagesizechanged="rgTicketsGrid_PageSizeChanged" > <mastertableview allowfilteringbycolumn="False" GroupLoadMode="Server" Height="95%" TableLayout="Auto" > </mastertableview> <SortingSettings EnableSkinSortStyles="false" /> <clientsettings allowdragtogroup="True" allowrowsdragdrop="True" enablerowhoverstyle="True" > <selecting allowrowselect="True" /> <clientevents onrowdropping="rowDropping" /> <clientevents onrowcontextmenu="RowContextMenu" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" > </Scrolling> </clientsettings> <activeitemstyle borderstyle="Solid" font-bold="True" /> <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <GroupingSettings ShowUnGroupButton="true" /> <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" /> <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" /> <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Middle" /> </telerik:RadGrid>
<telerik:RadComboBox ID="cbbMagasin" runat="server" Width="450px" Height="150px" ClientIDMode="Static" Filter="Contains" EmptyMessage="Choisir un magasin..." EnableLoadOnDemand="True" ShowMoreResultsBox="true" ItemsPerRequest="20" EnableVirtualScrolling="true" OnClientDropDownOpening="cbbMagasin_DropDownOpening" OnItemsRequested="cbbMagasin_ItemsRequested" LoadingMessage="Chargement..." Localization-NoMatches="Aucune correspondance" MarkFirstMatch="True"> </telerik:RadComboBox>protected void cbbMagasin_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { RadComboBox cbbMagasin = sender as RadComboBox; cbbMagasin.Items.Clear(); var magasins = DbContext.Magasins.Where(p => p.Ville.Contains(e.Text) || p.Enseigne.Contains(e.Text) || p.CodePDV.Contains(e.Text)).OrderBy(p => p.Enseigne).ThenBy(p => p.Ville); foreach (Magasin m in magasins) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = NamingHelpers.MagasinLabel(m); item.Value = m.MagasinID.ToString(); cbbMagasin.Items.Add(item); item.DataBind(); } }