datagrid Get "F3" function

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

My purpose is When the user press "F3" in specified column, i need to put
specified data in that column
Now, I can get "F3" by using [Protected Overrides Function
ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean ]

BUT I don't know how to put the data in that textbox,
I try Dim xx As DataRow =
dtInvCharges.Rows(dgInvCharges.CurrentRowIndex)
xx.Item("remark") = "F3 Command process"

it returns error.
Anybody got some idea ? Thanks a lot
 
Hi,

DataGrid1.Item(DataGrid1.CurrentCell) = "Test"



Ken

------------------------

My purpose is When the user press "F3" in specified column, i need to put
specified data in that column
Now, I can get "F3" by using [Protected Overrides Function
ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean ]

BUT I don't know how to put the data in that textbox,
I try Dim xx As DataRow =
dtInvCharges.Rows(dgInvCharges.CurrentRowIndex)
xx.Item("remark") = "F3 Command process"

it returns error.
Anybody got some idea ? Thanks a lot
 
Ken, It doesn't work ar.
Do I need to declare something first ?
dim xx as datarow = ctype( DataGrid1.Item(DataGrid1.CurrentCell),datarow) ??
xx.item("remark") = "Test"
 
I solve my stupid problem
dgInvCharges.Item(dgInvCharges.CurrentCell.RowNumber, 2) =
Me.objChgResult.pchgName

Agnes said:
Ken, It doesn't work ar.
Do I need to declare something first ?
dim xx as datarow = ctype( DataGrid1.Item(DataGrid1.CurrentCell),datarow) ??
xx.item("remark") = "Test"
Ken Tucker said:
Hi,

DataGrid1.Item(DataGrid1.CurrentCell) = "Test"



Ken

------------------------

My purpose is When the user press "F3" in specified column, i need to put
specified data in that column
Now, I can get "F3" by using [Protected Overrides Function
ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean ]

BUT I don't know how to put the data in that textbox,
I try Dim xx As DataRow =
dtInvCharges.Rows(dgInvCharges.CurrentRowIndex)
xx.Item("remark") = "F3 Command process"

it returns error.
Anybody got some idea ? Thanks a lot
 
Back
Top