You should be able to do something like this as well to accomplish the
same task, but without having to use a counter.
Any enumerated type will have this functionality
For each dr as DataRow in this.mainPanel1.detailPanel1.grdJobInfo.Rows
Messagebox.show(dr("PartNum"))
Next
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mike Anstey
Sent: Wednesday, June 23, 2010 7:21 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Looping through Ultragrid
Here is a c# example from one of my sdk projects, it should translate to
a c# customization :
private int PartExists(string partNum)
{
int index = -1;
for (int i = 0; i < this.mainPanel1.detailPanel1.grdJobInfo.Rows.Count;
i++)
{
if
(this.mainPanel1.detailPanel1.grdJobInfo.Rows[i].Cells["PartNum"].Text
== partNum)
{
index = i;
break;
}
}
return index;
}
________________________________
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of ksimon8fw
Sent: Wednesday, June 23, 2010 1:24 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Looping through Ultragrid
I'm hoping someone can give me a little bit of sample code. I've got an
ultragrid, and based upon an event, I just need to loop through the rows
and perform a process based upon a value. I know what I want to do, I've
just been struggling with the syntax.
The basic process I'm looking for is:
FOR I = 1 to NumberOfRows
if valueofcell in row i = something ..
NEXT I
Does anyone have a snippet of code they would be able to share?
Thanks.
Kevin Simon
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
same task, but without having to use a counter.
Any enumerated type will have this functionality
For each dr as DataRow in this.mainPanel1.detailPanel1.grdJobInfo.Rows
Messagebox.show(dr("PartNum"))
Next
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mike Anstey
Sent: Wednesday, June 23, 2010 7:21 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Looping through Ultragrid
Here is a c# example from one of my sdk projects, it should translate to
a c# customization :
private int PartExists(string partNum)
{
int index = -1;
for (int i = 0; i < this.mainPanel1.detailPanel1.grdJobInfo.Rows.Count;
i++)
{
if
(this.mainPanel1.detailPanel1.grdJobInfo.Rows[i].Cells["PartNum"].Text
== partNum)
{
index = i;
break;
}
}
return index;
}
________________________________
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of ksimon8fw
Sent: Wednesday, June 23, 2010 1:24 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Looping through Ultragrid
I'm hoping someone can give me a little bit of sample code. I've got an
ultragrid, and based upon an event, I just need to loop through the rows
and perform a process based upon a value. I know what I want to do, I've
just been struggling with the syntax.
The basic process I'm looking for is:
FOR I = 1 to NumberOfRows
if valueofcell in row i = something ..
NEXT I
Does anyone have a snippet of code they would be able to share?
Thanks.
Kevin Simon
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]