New col. in a dataview

  • Thread starter Thread starter Anita C
  • Start date Start date
A

Anita C

Hi,
I have created a new col. in a dataview of type int. For the value of this
col. related to the different records, I need to call a function -
GetReports(m_ReportSiteKey, 'value of col["FolderKey"]);

where 'value of col["FolderKey"] is the value for each row relevant to col.
"FolderKey". How do I get the 'value of col["FolderKey"] ?

Thanks
 
Hi
the dataview object has a reference to a table object" this is the table
that the dataview present " you would need that to get the values that you
want to get from the dataview .
inside that table you will find the rows collection , you need to get
into that then to the columns to get the value that you want to get ... so
you will be writing something like that into your code.
string the_Folder_key_value = myview.Table.Rows[NUM]
["FolderKey"].ToString();
you will need exactly this line of code to get the value of the folderkey
that you want to get........ you need to figure out the value of num
however"which is a reference to the row that you want to access .... so if
you are doing that to the whole dataview then you will be doing a loop like
this one to get all the values of folderkey
for ( int k ; k=o; k < myview.Table.Rows.Count){


string the_Folder_key_value = myview.Table.Rows[k]
["FolderKey"].ToString();

}
hope that was clear
 
Back
Top