Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
PaulNaude #1
Number of rows in a datagrid
I discovered the hard way that the property "VisibleRowCount" of a datagrid
is ONLY that, the number of visible rows, NOT the number of populated rows in
the datagrid.
I need the number of populated rows (i.e. the number of records the user has
access to by scrolling to the end of the list).
I can't get it from the table since the datagrid is filtered.
Should I actually run a for next loop to count the rows, or even create a
datatable from the datagrid?
I am sure there must be a short cut!
PaulNaude Guest
-
AdvancedDataGrid number of rows displayed
This is probably really easy but I can't find a property for it. How does the AdvancedDataGrid determine the number of rows to display if no height... -
how to limit number of rows in a textarea
:confused; I have a problem with limiting the textarea to a certain number of rows - after I specify the number of lines to 4 or any other number... -
DataGrid - Number of Displayed Rows
Hi All Hopefully this is a simple one. I have an empty datagrid (which is editable for input data). By default, flex is drawing 7 or so empty... -
Results with Variable number of rows...help!
Greetings, I've been playing around with this code a while it allows for a lot of flexability in terms of searching a database table. However... -
number of rows
Hi all: Can anybody tell me how can I know how many rows, indexes and fields there are in every table on my database ? Thanks in advance. ... -
Alvin Bruney - ASP.NET MVP #2
Re: Number of rows in a datagrid
nope either loop or use the dataset.tables.rows.count. if it is filtered
like you say, you can still get the sum of the filtered row by passing in
the filter to the dataset and a count expression. there's more help on this
topic on MSDN and code snippets to do it as well.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ [url]www.lulu.com/owc[/url]
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------
"PaulNaude" <PaulNaude@discussions.microsoft.com> wrote in message
news:95036EFD-46D8-4AC3-9A32-C1183EC8F3F6@microsoft.com...datagrid> I discovered the hard way that the property "VisibleRowCount" of ain> is ONLY that, the number of visible rows, NOT the number of populated rowshas> the datagrid.
>
> I need the number of populated rows (i.e. the number of records the user> access to by scrolling to the end of the list).
>
> I can't get it from the table since the datagrid is filtered.
>
> Should I actually run a for next loop to count the rows, or even create a
> datatable from the datagrid?
>
> I am sure there must be a short cut!
Alvin Bruney - ASP.NET MVP Guest
-
Scott M. #3
Re: Number of rows in a datagrid
What about using the table's defaultView.Rows.Count?
"Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
news:uqECttzzFHA.2792@tk2msftngp13.phx.gbl...> nope either loop or use the dataset.tables.rows.count. if it is filtered
> like you say, you can still get the sum of the filtered row by passing in
> the filter to the dataset and a count expression. there's more help on
> this
> topic on MSDN and code snippets to do it as well.
>
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> The Microsoft Office Web Components Black Book with .NET
> Now Available @ [url]www.lulu.com/owc[/url]
> Forth-coming VSTO.NET - Wrox/Wiley 2006
> -------------------------------------------------------
>
>
>
> "PaulNaude" <PaulNaude@discussions.microsoft.com> wrote in message
> news:95036EFD-46D8-4AC3-9A32-C1183EC8F3F6@microsoft.com...> datagrid>> I discovered the hard way that the property "VisibleRowCount" of a> in>> is ONLY that, the number of visible rows, NOT the number of populated
>> rows> has>> the datagrid.
>>
>> I need the number of populated rows (i.e. the number of records the user>>> access to by scrolling to the end of the list).
>>
>> I can't get it from the table since the datagrid is filtered.
>>
>> Should I actually run a for next loop to count the rows, or even create a
>> datatable from the datagrid?
>>
>> I am sure there must be a short cut!
>
Scott M. Guest
-
PaulNaude #4
Re: Number of rows in a datagrid
Unfortunaterly, Rows is not a member of defaultview. That should have been
ideal!
"Scott M." wrote:
> What about using the table's defaultView.Rows.Count?
>
>
> "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
> news:uqECttzzFHA.2792@tk2msftngp13.phx.gbl...>> > nope either loop or use the dataset.tables.rows.count. if it is filtered
> > like you say, you can still get the sum of the filtered row by passing in
> > the filter to the dataset and a count expression. there's more help on
> > this
> > topic on MSDN and code snippets to do it as well.
> >
> > --
> > Regards,
> > Alvin Bruney [MVP ASP.NET]
> >
> > [Shameless Author plug]
> > The Microsoft Office Web Components Black Book with .NET
> > Now Available @ [url]www.lulu.com/owc[/url]
> > Forth-coming VSTO.NET - Wrox/Wiley 2006
> > -------------------------------------------------------
> >
> >
> >
> > "PaulNaude" <PaulNaude@discussions.microsoft.com> wrote in message
> > news:95036EFD-46D8-4AC3-9A32-C1183EC8F3F6@microsoft.com...> > datagrid> >> I discovered the hard way that the property "VisibleRowCount" of a> > in> >> is ONLY that, the number of visible rows, NOT the number of populated
> >> rows> > has> >> the datagrid.
> >>
> >> I need the number of populated rows (i.e. the number of records the user> >> >> access to by scrolling to the end of the list).
> >>
> >> I can't get it from the table since the datagrid is filtered.
> >>
> >> Should I actually run a for next loop to count the rows, or even create a
> >> datatable from the datagrid?
> >>
> >> I am sure there must be a short cut!
> >
>
>PaulNaude Guest
-
PaulNaude #5
Re: Number of rows in a datagrid
BUT, I found ...defaultview.count which does exaclty that!!! Thanks for the
idea!
"Scott M." wrote:
> What about using the table's defaultView.Rows.Count?
>
>
> "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
> news:uqECttzzFHA.2792@tk2msftngp13.phx.gbl...>> > nope either loop or use the dataset.tables.rows.count. if it is filtered
> > like you say, you can still get the sum of the filtered row by passing in
> > the filter to the dataset and a count expression. there's more help on
> > this
> > topic on MSDN and code snippets to do it as well.
> >
> > --
> > Regards,
> > Alvin Bruney [MVP ASP.NET]
> >
> > [Shameless Author plug]
> > The Microsoft Office Web Components Black Book with .NET
> > Now Available @ [url]www.lulu.com/owc[/url]
> > Forth-coming VSTO.NET - Wrox/Wiley 2006
> > -------------------------------------------------------
> >
> >
> >
> > "PaulNaude" <PaulNaude@discussions.microsoft.com> wrote in message
> > news:95036EFD-46D8-4AC3-9A32-C1183EC8F3F6@microsoft.com...> > datagrid> >> I discovered the hard way that the property "VisibleRowCount" of a> > in> >> is ONLY that, the number of visible rows, NOT the number of populated
> >> rows> > has> >> the datagrid.
> >>
> >> I need the number of populated rows (i.e. the number of records the user> >> >> access to by scrolling to the end of the list).
> >>
> >> I can't get it from the table since the datagrid is filtered.
> >>
> >> Should I actually run a for next loop to count the rows, or even create a
> >> datatable from the datagrid?
> >>
> >> I am sure there must be a short cut!
> >
>
>PaulNaude Guest
-
Scott M. #6
Re: Number of rows in a datagrid
HTH :)
"PaulNaude" <PaulNaude@discussions.microsoft.com> wrote in message
news:7E0A7827-3506-484F-98E0-F06BAFFE6118@microsoft.com...> BUT, I found ...defaultview.count which does exaclty that!!! Thanks for
> the
> idea!
>
> "Scott M." wrote:
>>> What about using the table's defaultView.Rows.Count?
>>
>>
>> "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
>> news:uqECttzzFHA.2792@tk2msftngp13.phx.gbl...>>>> > nope either loop or use the dataset.tables.rows.count. if it is
>> > filtered
>> > like you say, you can still get the sum of the filtered row by passing
>> > in
>> > the filter to the dataset and a count expression. there's more help on
>> > this
>> > topic on MSDN and code snippets to do it as well.
>> >
>> > --
>> > Regards,
>> > Alvin Bruney [MVP ASP.NET]
>> >
>> > [Shameless Author plug]
>> > The Microsoft Office Web Components Black Book with .NET
>> > Now Available @ [url]www.lulu.com/owc[/url]
>> > Forth-coming VSTO.NET - Wrox/Wiley 2006
>> > -------------------------------------------------------
>> >
>> >
>> >
>> > "PaulNaude" <PaulNaude@discussions.microsoft.com> wrote in message
>> > news:95036EFD-46D8-4AC3-9A32-C1183EC8F3F6@microsoft.com...
>> >> I discovered the hard way that the property "VisibleRowCount" of a
>> > datagrid
>> >> is ONLY that, the number of visible rows, NOT the number of populated
>> >> rows
>> > in
>> >> the datagrid.
>> >>
>> >> I need the number of populated rows (i.e. the number of records the
>> >> user
>> > has
>> >> access to by scrolling to the end of the list).
>> >>
>> >> I can't get it from the table since the datagrid is filtered.
>> >>
>> >> Should I actually run a for next loop to count the rows, or even
>> >> create a
>> >> datatable from the datagrid?
>> >>
>> >> I am sure there must be a short cut!
>> >
>> >
>>
>>
Scott M. Guest



Reply With Quote

