Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-02-2009
Member
 
Join Date: Jan 2009
Posts: 18
How can I get the row count from DataGrid?

Hi,
I want to get the row count displayed on the DataGrid.
I can get this row count in dataview but not in the Datagrid. The source for DataGrid is the DataView which has a row filter.
I want to get the rowcount from DataGrid.
Please help me

Regards,
Reply With Quote
  #2  
Old 04-02-2009
Member
 
Join Date: May 2008
Posts: 115
Re: How can I get the row count from DataGrid?

u can try to get the row count form the datasource ie. DataView
Reply With Quote
  #3  
Old 04-02-2009
Member
 
Join Date: May 2008
Posts: 40
Re: How can I get the row count from DataGrid?

Well I don't have exat answer for you but I am doing it in this way

Use DataView.Count

DataGrid is binded to "TableName" witha filter set for it
ds.TableName.DefaultView.RowFilter = "name like %hello%";
ds.Channels.DefaultView.Count ===>> current visible rows
ds.Channels.Count ===>> total rows

Hence I don't need to get row count from DataGrid!
Reply With Quote
  #4  
Old 04-02-2009
Member
 
Join Date: Jan 2009
Posts: 18
Re: How can I get the row count from DataGrid?

Hey Thanks for the prompt reply!
I will try this & let you know!

Any other solution?
Reply With Quote
  #5  
Old 04-02-2009
Member
 
Join Date: May 2008
Posts: 13
Re: How can I get the row count from DataGrid?

HI


There is method in datagrid visibleRowCount that how u will get the total row count
Just AllowEdit Property of the DataGrid to true
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How can I get the row count from DataGrid?"
Thread Thread Starter Forum Replies Last Post
Mac OSX error message? INVALID VOLUME FILE COUNT and INVALID VOLUME DIRECTORY COUNT? Aaghaz Operating Systems 6 25-02-2011 10:40 AM
Datagrid VS Gridview Techno Guru Software Development 5 16-01-2010 12:42 PM
How to print web datagrid in VB.NET spuff Windows Software 3 31-07-2009 11:33 AM
How to Export datagrid to pdf Integer Software Development 3 17-03-2009 07:58 PM
Add ComboBox in DataGrid in VB 6.0 Jateen Software Development 3 15-01-2009 06:31 PM


All times are GMT +5.5. The time now is 10:30 PM.