471,319 Members | 1,267 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

How to get a sinlge value from a dataview?

Hi,

I'm a bit new to C# and .NET and I'm struggling to find the right syntax for
my problem.

I am trying to figure out how to get a single value from a view? Row 0,
Column 0 (the view has only one result anyway). I know how to get this from
a dataset, but the syntax is not the same for DataViews and I'm struggling
with this.

Can anyone please please help me? I've been working on this same one issue
for more than 15 work hours with no progress at all. =(

Thanks.
-Amanda
Jan 19 '06 #1
5 5170
Take a look at the DataView.Item property

"timpera2501" <ti*********@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
Hi,

I'm a bit new to C# and .NET and I'm struggling to find the right syntax
for
my problem.

I am trying to figure out how to get a single value from a view? Row 0,
Column 0 (the view has only one result anyway). I know how to get this
from
a dataset, but the syntax is not the same for DataViews and I'm struggling
with this.

Can anyone please please help me? I've been working on this same one issue
for more than 15 work hours with no progress at all. =(

Thanks.
-Amanda

Jan 19 '06 #2
DataView.Item property doesn't show up in my intellisense?

"threetoes" wrote:
Take a look at the DataView.Item property

"timpera2501" <ti*********@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
Hi,

I'm a bit new to C# and .NET and I'm struggling to find the right syntax
for
my problem.

I am trying to figure out how to get a single value from a view? Row 0,
Column 0 (the view has only one result anyway). I know how to get this
from
a dataset, but the syntax is not the same for DataViews and I'm struggling
with this.

Can anyone please please help me? I've been working on this same one issue
for more than 15 work hours with no progress at all. =(

Thanks.
-Amanda


Jan 19 '06 #3
> DataView.Item property doesn't show up in my intellisense?

It should just be an indexer in C#, so use myView[0] to get the first
row (as a DataRowView), and myView[0][0] to get the first column on the
first row. Post some code if that doesn't help...

Jan 19 '06 #4
I got it!

Thanks. =)

"Paul Henderson" wrote:
DataView.Item property doesn't show up in my intellisense?


It should just be an indexer in C#, so use myView[0] to get the first
row (as a DataRowView), and myView[0][0] to get the first column on the
first row. Post some code if that doesn't help...

Jan 19 '06 #5
"Paul Henderson" wrote:
DataView.Item property doesn't show up in my intellisense?


It should just be an indexer in C#, so use myView[0] to get the first
row (as a DataRowView), and myView[0][0] to get the first column on the
first row. Post some code if that doesn't help...

Is there a way to implement the indexer in C++ Syntax. Didnt find something
appropriate...
Mar 29 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by MS Newsgroups | last post: by
7 posts views Thread by Hemang Shah | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.