or
RadDropDownTree.SelectedValue = "2";RadDropDownTree.SelectedText = "Prime"<telerik:RadComboBox ID="ddlCompany" runat="server" Visible="False" AutoPostBack="True" DataValueField="CompanyID" DataTextField="Name" OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged" > <Items> </Items> </telerik:RadComboBox> <telerik:RadGrid ID="productionSearchResults" runat="server" AutoGenerateColumns="false" CellPadding="0" Skin="Windows7" EnableLinqExpressions="false" Width="100%" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" GridLines="None" PageSize="100" OnItemDataBound="productionSearchResults_ItemDataBound" AllowCustomPaging="true"> <HeaderContextMenu EnableAutoScroll="True" /> <HeaderStyle Font-Names="Verdana" /> <AlternatingItemStyle Font-Names="Verdana" /> <ItemStyle Font-Names="Verdana" /> <PagerStyle AlwaysVisible="True" /> <GroupingSettings CaseSensitive="false" /> <ClientSettings> <ClientEvents OnGridCreated="SizeGridToVerticalContent" /> <Scrolling UseStaticHeaders="true" AllowScroll="true" FrozenColumnsCount="0" /> </ClientSettings> <MasterTableView CommandItemDisplay="Top" Width="98%"> <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToWordButton="true" ExportToWordText="Export results to Word" ShowExportToExcelButton="true" ExportToExcelText="Export results to Excel" ShowExportToCsvButton="false" ExportToCsvText="Export results to CSV" ShowExportToPdfButton="false" ExportToPdfText="Export results to PDF" /> <Columns> <telerik:GridBoundColumn Visible="False" DataField="SessionID" HeaderText="SID" UniqueName="SessionID" AllowFiltering="false" AllowSorting="false" > <HeaderStyle BackColor="#E3E9DC"></HeaderStyle> </telerik:GridBoundColumn> <telerik:GridBoundColumn Visible="False" DataField="Company" HeaderText="Company" UniqueName="Company" AllowFiltering="false" AllowSorting="false" > <HeaderStyle BackColor="#E3E9DC"></HeaderStyle> </telerik:GridBoundColumn><!-- other columns go here --> <telerik:GridTemplateColumn HeaderText="Ship List" AllowFiltering="false" UniqueName="ShipList" > <HeaderStyle BackColor="#F2EDB7"></HeaderStyle> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid>Protected Sub ddlCompany_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ddlCompany.SelectedIndexChanged Dim ddl As RadComboBox = CType(sender, RadComboBox) ddl.Items.FindItemByValue(e.Value).Selected = True CompanyID = CInt(e.Value) Dim filterExpression As String filterExpression = "([Company]='" + e.Value + "')" productionSearchResults.MasterTableView.FilterExpression = filterExpression productionSearchResults.Rebind() End SubPrivate Sub productionSearchResults_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles productionSearchResults.NeedDataSource pageIndex = productionSearchResults.CurrentPageIndex Controller.Page(Me) productionSearchResults.DataSource = Productions productionSearchResults.MasterTableView.VirtualItemCount = totalCount productionSearchResults.VirtualItemCount = totalCount End SubProtected Sub productionSearchResults_ItemDataBound(sender As Object, e As GridItemEventArgs) Dim sImgX As String Dim sImgCheck As String sImgX = ResolveUrl("~/images/x.gif") sImgCheck = ResolveUrl("~/images/check.gif") If TypeOf e.Item Is GridDataItem Then Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) If dataItem("ProductionNotes").Text.Contains("NEEDS REVIEW") Then e.Item.BackColor = Color.Pink End If dataItem("SessionID").Text = String.Format("<a href=""{0}"">{1}</a>", _ BuildPageUrl("production/ProductionList.aspx", NavLevel.Session, Integer.Parse(dataItem("SessionID").Text)), dataItem("SessionID").Text) If Len(PMSession.SID) = 0 Then dataItem("shipList").Text = String.Format("<a href=""{0}?ProductionID={1}"" target=_Blank><img src=""{2}"" border=0></a>", _ BuildPageUrl("reports/Session/SessionShipList.aspx", NavLevel.Session, iSID), ProductionID _ , ResolveUrl("~/images/report2.gif")) Else dataItem("ProductionID").Text = String.Format("<a href=""{0}?id={1}&cmd=2"">{2}</a>", BuildPageUrl("production/ProductionDetail.aspx"), dataItem("ProductionID"), iSID) dataItem("shipList").Text = String.Format("<a href=""{0}?ProductionID={1}"" target=_Blank><img src=""{2}"" border=0></a>", _ BuildPageUrl("reports/Session/SessionShipList.aspx"), ProductionID, ResolveUrl("~/images/report2.gif")) End If Else End Iffunction CountyItemsRequesting(sender, eventArgs) { var context = eventArgs.get_context(); context.District = $find("<%= ddlDistrict.ClientID %>")._value;}