Results 1 to 5 of 5

Thread: How can I get the row count from DataGrid?

  1. #1
    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,

  2. #2
    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

  3. #3
    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!

  4. #4
    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?

  5. #5
    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

Similar Threads

  1. Replies: 6
    Last Post: 25-02-2011, 10:40 AM
  2. Datagrid VS Gridview
    By Techno Guru in forum Software Development
    Replies: 5
    Last Post: 16-01-2010, 12:42 PM
  3. How to print web datagrid in VB.NET
    By spuff in forum Windows Software
    Replies: 3
    Last Post: 31-07-2009, 11:33 AM
  4. How to Export datagrid to pdf
    By Integer in forum Software Development
    Replies: 3
    Last Post: 17-03-2009, 07:58 PM
  5. Add ComboBox in DataGrid in VB 6.0
    By Jateen in forum Software Development
    Replies: 3
    Last Post: 15-01-2009, 06:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,716,045,638.61114 seconds with 17 queries