Welcome Guest Search | Active Topics | Sign In | Register

processing a grid Options
MAB
Posted: Wednesday, July 16, 2008 10:39:57 AM
Rank: Newbie
Groups: Member

Joined: 3/24/2008
Posts: 8
I have populated a grid and after the user has selected a set of features from radio button lists and drop down lists, I want to process the rows in the grid.

Can you help with an example of the for loop to read rhe rows in the grid and how to address a specific column in the row being processed

sample pseudo code:

for (int i = 2; i < grid.RecordCount; i ++)
{
string CUSIP = grid.row[i].column[2].toString();
RatingRow CurrRating = wsRatings.GetCurrentRating(CUSIP);
grid.row[i].column[3] = CurrRating["Rating"].ToString();
grid.row[i].column[4] = CurrRating["RatingDate"].ToString();
}

Thanks.

Mike B.
eo_support
Posted: Wednesday, July 16, 2008 10:47:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi Mike,

I believe it can be done by something like this:

Code: C#
for (int i = 2; i < grid.Items.Count; i++)
{
    string CUSIP = grid.Items[i].Cells[2].ToString();

    RatingRow CurrRating = wsRatings.GetCurrentRating(CUSIP);
    
    grid.Items[i].Cells[3] = CurrRating["Rating"].ToString();
    grid.Items[i].Cells[4] = CurrRating["RatingDate"].ToString();
}


The key is row[x] -> Items[x], column[x] ->Cells[x]. You can find all the reference information at here:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.html

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.