or
Dim oConn As OdbcConnection<br>
Dim connectionString As String<br>
connectionString = ConfigurationManager.ConnectionStrings("ODBCConnection").ToString<br>
oConn = New OdbcConnection(connectionString)<br>
commandString = "SELECT sCode as Κωδικός, sName as Περιγραφή,sUnitOM as ΜΜ,sWhsalePr as Λιανική From smast where sCode like '" + TextBox1.Text + "%' or sSuplCode like '" + TextBox1.Text + "%' order by scode"<br>
Dim myAdapter As New OdbcDataAdapter(commandString, oConn)<br>
Dim productDataSet As DataSet = New DataSet<br>
myAdapter.Fill(productDataSet)<br>
RadGrid1.DataSource = productDataSet<br>
RadGrid1.DataBind()
.RadPanelBar ul.rpGroup { list-style-type:circle !important;}<telerik:RadComboBox ID="Address_LocationRadComboBox" runat="server" SelectedValue='<%# Bind("Address_Location") %>' Text='<%# Bind("Address_Location") %>' Width="150px"> <Items> <telerik:RadComboBoxItem runat="server" Text="Florida" Value="Florida" /> <telerik:RadComboBoxItem runat="server" Text="New Jersey" Value="New Jersey" /> <telerik:RadComboBoxItem runat="server" Text="New York" Value="New York" /> <telerik:RadComboBoxItem runat="server" Text="Ohio" Value="Ohio" /> <telerik:RadComboBoxItem runat="server" Text="Wisconsin" Value="Wisconsin" /> </Items></telerik:RadComboBox>.........protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { string[] retrievedLocations = (string[])Session["LocationData"]; Array.Sort(retrievedLocations); // Assuming Array retrievedLocations has following Values: // New Jersey // New York // Wisconsin if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem item = (GridEditableItem)e.Item; // Beginning of Loop each row in array retrievedLocations until no rows in array RadComboBox combo = (RadComboBox)item.FindControl("Address_LocationRadComboBox"); foreach (RadComboBoxItem ComboItem in combo.Items) { if (ComboItem.Value != row value of array retrievedLocations) { ComboItem.Visible = false; } else { ComboItem.Visible = true; } } // End of Loop each row in array retrievedLocations until no rows in array } } <telerik:RadAjaxPanel ID="apnlPayments" runat="server" LoadingPanelID="ajaxLoadingPanel"> <telerik:RadGrid ID="gridPayments" runat="server" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true" AllowAutomaticInserts="true" AllowFilteringByColumn="false" AllowPaging="false" AllowSorting="true" AllowMultiRowSelection="true" CellSpacing="0" CellPadding="0" PageSize="500" ShowGroupPanel="false" AllowCustomPaging="false" EnableLinqExpressions="false" GridLines="Both" HeaderStyle-Wrap="false" AutoGenerateColumns="false" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" OnItemDataBound="grid_ItemDataBound" OnPageIndexChanged="grid_PageIndexChanged" OnPageSizeChanged="grid_PageSizeChanged" OnNeedDataSource="grid_NeedDataSource" OnInsertCommand="gridPayments_InsertCommmand" OnUpdateCommand="gridPayments_UpdateCommand" OnDeleteCommand="gridPayments_DeleteCommand" OnPreRender="gridPayments_PreRender"> <ClientSettings allowautoscrollondragdrop="false" allowexpandcollapse="false" allowgroupexpandcollapse="false"> <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" /> <Scrolling AllowScroll="false" UseStaticHeaders="true" FrozenColumnsCount="4" /> <ClientEvents OnGridCreated="grid_GridCreated" /> <Resizing AllowResizeToFit="true" EnableRealTimeResize="true" /> </ClientSettings> <MasterTableView EditMode="EditForms" CommandItemDisplay="Top" AutoGenerateColumns="false" DataKeyNames="LoanPaymentID" InsertItemPageIndexAction="ShowItemOnCurrentPage"> <ItemStyle CssClass="Row0" /> <AlternatingItemStyle CssClass="Row1" /> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px" /></RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px" /></ExpandCollapseColumn> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" Visible="true"> <ItemStyle HorizontalAlign="Center" Wrap="false" VerticalAlign="Middle" /></telerik:GridEditCommandColumn> <telerik:GridButtonColumn ConfirmText="Delete this Payment?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" ImageUrl="~/Images/icon_delete.png" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" /> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="LoanPaymentPS_ACCT_NO" MaxLength="50" FilterControlAltText="Filter LoanPaymentPS_ACCT_NO column" HeaderStyle-Wrap="false" HeaderText="PS ACCT NO" SortExpression="LoanPaymentPS_ACCT_NO" UniqueName="PS_ACCT_NO" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridDateTimeColumn DataField="LoanPaymentDateDue" DataFormatString="{0:MM/dd/yyyy}" FilterControlAltText="Filter LoanPaymentDateDue column" HeaderStyle-Wrap="false" HeaderText="DATE DUE" SortExpression="LoanPaymentDateDue" UniqueName="LoanPaymentDateDue" ReadOnly="true"> </telerik:GridDateTimeColumn> <telerik:GridDateTimeColumn DataField="LoanPaymentDatePaid" DataFormatString="{0:MM/dd/yyyy}" FilterControlAltText="Filter LoanPaymentDatePaid column" HeaderStyle-Wrap="false" HeaderText="DATE PAID" SortExpression="LoanPaymentDatePaid" UniqueName="LoanPaymentDatePaid" DataType="System.DateTime"> </telerik:GridDateTimeColumn> <telerik:GridNumericColumn DataField="LoanPaymentAmount" NumericType="Currency" FilterControlAltText="Filter LoanPaymentAmount column" HeaderStyle-Wrap="false" HeaderText="AMOUNT" SortExpression="LoanPaymentAmount" UniqueName="LoanPaymentAmount"> </telerik:GridNumericColumn> <telerik:GridBoundColumn DataField="LoanPaymentDescription" MaxLength="50" FilterControlAltText="Filter LoanPaymentDescription column" HeaderStyle-Wrap="false" HeaderText="DESCRIPTION" SortExpression="LoanPaymentDescription" UniqueName="LoanPaymentDescription"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LoanPaymentUserReference" MaxLength="50" FilterControlAltText="Filter LoanPaymentUserReference column" HeaderStyle-Wrap="false" HeaderText="USER REFERENCE" SortExpression="LoanPaymentUserReference" UniqueName="LoanPaymentUserReference"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LoanPaymentMethodNo" MaxLength="50" FilterControlAltText="Filter LoanPaymentMethodNo column" HeaderStyle-Wrap="false" HeaderText="METHOD NO" SortExpression="LoanPaymentMethodNo" UniqueName="LoanPaymentMethodNo"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LoanPaymentMethodReference" MaxLength="50" FilterControlAltText="Filter LoanPaymentMethodReference column" HeaderStyle-Wrap="false" HeaderText="METHOD REFERENCE" SortExpression="LoanPaymentMethodReference" UniqueName="LoanPaymentMethodReference"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LoanPaymentType" MaxLength="50" FilterControlAltText="Filter LoanPaymentType column" HeaderStyle-Wrap="false" HeaderText="TYPE" SortExpression="LoanPaymentType" UniqueName="LoanPaymentType"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <FilterMenu EnableImageSprites="false" /> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default" /> </telerik:RadGrid> </telerik:RadAjaxPanel>