Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting field value from DataRowView
Message
 
To
21/08/2002 10:29:38
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00691937
Message ID:
00692213
Views:
18
Try these.

oDataRow["company"]

OR

oDataRow[0]


>Neither one worked. Intellisense stop after the left bracket in Table[
>
>My line:
>
>oDataRow.DataView.Table.Columns["company"].ToString();
>
>is close but only returns the column name.
>
>Any other suggestons?
>
>Thanks,
>
>Jerryt
>
>
>>oDataRow.DataView.Table[0].Rows[0]["company"]
>>
>>OR
>>
>>oDataRow.DataView.Table["TableName"].Rows[0]["company"]
>>
>>
>>>I'm trying to use C# to retrieve a value from a field in a Datagrid.
>>>
>>>The DataGrid is bound to a DataSet object and it is populated with data.
>>>
>>>I am trying to use the DataRowView to get the current value of a field in the current row.
>>>
>>>Here is my DataRowView line:
>>>DataRowView oDataRow = (DataRowView) this.BindingContext[myDataSet, "mytable"].Current;
>>>
>>>Now how can I get the value of a field called COMPANY from the DataRowView object?
>>>
>>>I tried this, but only the field name is returned not the value.
>>>string companyname = oDataRow.DataView.Table.Columns["company"].ToString();
>>>
>>>Any other suggestion on retrieve a field from the current row in a DataSet would be great.
>>>
>>>Thanks,
>>>
>>>Jerryt
- Jayesh
Previous
Reply
Map
View

Click here to load this message in the networking platform