on 12-26-2014 12:00 PM
Hi,
I am working on a grid, and am using VB.NET.
The picture below shows what I want to achieve.
I found an answer here:
And here is my code, which is an adaptation of the above thread:
'// If TYPE = GRPO
If oOPDN.GetByKey(oDocEntry) Then
oOPDN.UserFields.Fields.Item("U_HandOver").Value = "Y"
oOPDN.UserFields.Fields.Item("Seq").Value = oValue <--- How to dim oValue?
retVal = oOPDN.Update
....
.....
My Question:
The Update works for "U_HandOver", but not for "Seq" because I have not dim "oValue"
How to declare oValue?
Thanks
Leon Lai
Hi Leon,
As you said you are using Grid, oValue should be oGrid.DataTable.GetValue("Seq", RowNumber).ToString()
You can convert it the desired DataType. So it should be like this:
for (int k = 0; k <= oGrid.Rows.Count - 1; k++)
{
string IsSelectedHandOver = oGrid.DataTable.GetValue("U_HandOver", k).ToString();
string SEQ = oGrid.DataTable.GetValue("Seq", RowNumber).ToString();
string Type = oGrid.DataTable.GetValue("TYPE", RowNumber).ToString();
if (Type == "GRPO")
{
If oOPDN.GetByKey(oDocEntry) Then
oOPDN.UserFields.Fields.Item("U_HandOver").Value = "Y"
oOPDN.UserFields.Fields.Item("Seq").Value = SEQ <--- I am assuming SEQ is of Alphanumeric Type
retVal = oOPDN.Update
}
}
Hope it helps.
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankit
Thanks for your reply.
I am trying to convert your C# code into VB.NET, but my converter is running indefinitely.
I don't know if it's a problem with my converter or your code.
I only need this code:
oValue = oGrid.DataTable.GetValue("Seq", RowNumber).ToString()
Please rewrite it correctly in VB.NET for me. So I can test it.
I tried the below, but it does not work:
Dim oValue As Integer = oGrid.oDataTable.GetValue("Seq", pVal.Row)
Best Regards,
Leon
User | Count |
---|---|
98 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.