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
With
End
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
Next
End
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> |