Datagrid item count while paging........
-
Hi All, I am having problem regarding paging in datagrid. datagrid1.items.count will give me total number of items in grid. But if I am using Paging in grid and I want count total number of items in grid how I can do that. datagrid1.items.count will provide count for current page only and not for total items in all pages in datagrid. I hope you will suggest some solution. Regards, Nagraj -- modified at 6:51 Friday 30th June, 2006
-
Hi All, I am having problem regarding paging in datagrid. datagrid1.items.count will give me total number of items in grid. But if I am using Paging in grid and I want count total number of items in grid how I can do that. datagrid1.items.count will provide count for current page only and not for total items in all pages in datagrid. I hope you will suggest some solution. Regards, Nagraj -- modified at 6:51 Friday 30th June, 2006
hi i think u were binding ur Datagrid usng datatable then u can count the number rows in datatable. like let say dim dt as datatable dt.rows.count will give u the number of rows that will show in datagrid. i think it will help full for u or u r using some thing else to bind the grid. thanks aavesh
-
Hi All, I am having problem regarding paging in datagrid. datagrid1.items.count will give me total number of items in grid. But if I am using Paging in grid and I want count total number of items in grid how I can do that. datagrid1.items.count will provide count for current page only and not for total items in all pages in datagrid. I hope you will suggest some solution. Regards, Nagraj -- modified at 6:51 Friday 30th June, 2006
Hi , I cant actually understand your problem. You are binding your grid with some table data through dataset.Then you can easily count your total no. of records by a single query or one line of code. if you are using dataset then put----
DataTable dt=(DataTable) ds.Table[0];// ds is the DataSet name int count; count=dt.Rows.Count();
Alternatively you can use SQL query or stored procedure for counting total records. Even if you add or delete records from datagrid then update the dataset. Why are you usingdatagrid1.items.count
? May be I cant understand your problem. If I am wrong then write without hesitation. Tirthadip Live life to the fullest -
Hi , I cant actually understand your problem. You are binding your grid with some table data through dataset.Then you can easily count your total no. of records by a single query or one line of code. if you are using dataset then put----
DataTable dt=(DataTable) ds.Table[0];// ds is the DataSet name int count; count=dt.Rows.Count();
Alternatively you can use SQL query or stored procedure for counting total records. Even if you add or delete records from datagrid then update the dataset. Why are you usingdatagrid1.items.count
? May be I cant understand your problem. If I am wrong then write without hesitation. Tirthadip Live life to the fullestHi, Basically I am using 3 tier arch. In which we are calling function which is in 2 layer.this function returns dataset which is then assigned to datagrid in 1 layer.So I can only return dataset from function and not table item count. So my question is how I can get no of items from this returned dataset I hope now I am clear from myside. Thanks,
-
Hi All, I am having problem regarding paging in datagrid. datagrid1.items.count will give me total number of items in grid. But if I am using Paging in grid and I want count total number of items in grid how I can do that. datagrid1.items.count will provide count for current page only and not for total items in all pages in datagrid. I hope you will suggest some solution. Regards, Nagraj -- modified at 6:51 Friday 30th June, 2006
-
Hi All, I am having problem regarding paging in datagrid. datagrid1.items.count will give me total number of items in grid. But if I am using Paging in grid and I want count total number of items in grid how I can do that. datagrid1.items.count will provide count for current page only and not for total items in all pages in datagrid. I hope you will suggest some solution. Regards, Nagraj -- modified at 6:51 Friday 30th June, 2006
Hi, Thanks for your time,Your solution works. But I find out some another solution. Hope to meet soon............ Regards, Nagraj.