or
((Telerik.WinControls.UI.GridViewDecimalColumn)rgvGrid.Columns["Amount"]).DecimalPlaces = 2;
Using context As New FES_ThreeWayMatchEntityModel.ThreeWayMatchEntities Dim q = From lh In context.Invoice_Header Join v In context.Vendors On lh.Vendor_ID Equals v.Vendor_ID Select v.Vendor_Name, lh.Shipment_Number, lh.Invoice_Number, lh.Invoice_Date, lh.Invoice_Total invoiceList.invoiceDataGrid.DataSource = q End Using ' Create the hyperelink column Dim hl As New GridViewHyperlinkColumn hl.Name = "hlVendorName" With invoiceList.invoiceDataGrid .BestFitColumns() .Columns("Vendor_Name").IsVisible = False ' Hide the original field .Columns("Shipment_Number").HeaderText = "Lot/Shipment Number" .Columns("Invoice_Number").HeaderText = "Invoice Number" .Columns("Invoice_Date").HeaderText = "Invoice Date" .Columns("Invoice_Date").FormatString = "{0:MM/dd/yyyy}" .Columns("Invoice_total").HeaderText = "Invoice Total" ' Add the hyperlink column .Columns.AddRange(hl) .Columns.Move(6, 0) End WithEnd Sub
When I search for an item in a row, the grid does not scroll down to the selected row.
The row is selected, but I have to manually scroll down to the selected row.
I have AutoScroll = true
Thanks
If filterTextBox.Text <> "" Then For Each row As GridViewDataRowInfo In LotDetailsDataGrid.Rows If (filterTextBox.Text.Equals(row.Cells("ISBN_13").Value.ToString)) Then row.IsSelected = True Exit For End If NextEnd If
| if (ZoneText is RadComboBox) |
| { |
| ((RadComboBox)ZoneText).EnableViewState = false; |
| if (mode == ModeEdit.ADD) |
| { |
| ((RadComboBox)ZoneText).BackColor = Color.White; |
| ((RadComboBox)ZoneText).ShowToggleImage = true; |
| //((RadComboBox)ZoneText).ShowDropDownOnTextboxClick = true; |
| //((RadComboBox)ZoneText).ChangeTextOnKeyBoardNavigation = true; |
| ((RadComboBox)ZoneText).OnClientKeyPressing = ""; |
| ((RadComboBox)ZoneText).OnClientDropDownOpening = ""; |
| ((RadComboBox)ZoneText).EnableTextSelection = true; |
| } |
| if (mode == ModeEdit.BROWSE) |
| { |
| ((RadComboBox)ZoneText).BackColor = Color.FromName("#E6E6E6"); |
| ((RadComboBox)ZoneText).ShowToggleImage = false; |
| //((RadComboBox)ZoneText).ShowDropDownOnTextboxClick = false; |
| //((RadComboBox)ZoneText).ChangeTextOnKeyBoardNavigation = false; |
| ((RadComboBox)ZoneText).OnClientKeyPressing = "CancelKeyPress"; |
| ((RadComboBox)ZoneText).OnClientDropDownOpening = "CancelDropDown"; |
| ((RadComboBox)ZoneText).EnableTextSelection = false; |
| } |
| if (mode == ModeEdit.EDIT) |
| { |
| ((RadComboBox)ZoneText).BackColor = Color.White; |
| ((RadComboBox)ZoneText).ShowToggleImage = true; |
| //((RadComboBox)ZoneText).ShowDropDownOnTextboxClick = true; |
| //((RadComboBox)ZoneText).ChangeTextOnKeyBoardNavigation = true; |
| ((RadComboBox)ZoneText).OnClientKeyPressing = ""; |
| ((RadComboBox)ZoneText).OnClientDropDownOpening = ""; |
| ((RadComboBox)ZoneText).EnableTextSelection = true; |
| } |
| } |
| public enum ModeEdit |
| { |
| ADD, |
| EDIT, |
| BROWSE |
| } |
| <script type="text/javascript"> |
| function CancelDropDown(sender, eventArgs) { |
| eventArgs.set_cancel(true); |
| } |
| function CancelKeyPress(sender, eventArgs) |
| { |
|
eventArgs.get_domEvent().keyCode = null; |
| } |
| </script> |

"class_grey" (some picture from imagelist container).Private Sub RadTreeView1_NodeCheckedChanging(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RadTreeViewCancelEventArgs) Handles RadTreeView1.NodeCheckedChanging If Not e.Node.Checked AndAlso e.Node.ImageKey = "class_grey" Then e.Cancel = True End IfEnd SubPrivate Sub loadLotDetails(PO_Number As String) Dim query = From l In context.Lot_Header.Include("Lot_Detail") Where l.Lot_Number = PO_Number And l.Lot_Process_Status <> "90" Select l lotDetailsGridView.DataSource = queryEnd SubPrivate Sub btnSearchPO_Click(sender As System.Object, e As System.EventArgs) Handles btnSearchPO.Click LotDetailsDataGrid.DataSource = getLotDetails(PurchaseOrderTextBox.Text)End SubPrivate Function getLotDetails(lotNumber As Integer) As List(Of Lot_Detail) Using context As New Three_Way_MatchEntities Dim lot = (From ld In context.Lot_Detail Where (ld.Lot_Number = lotNumber) Select ld).ToList Return lot End UsingEnd Function