paging in datalist in vb.net1.1
-
Sir, Is it possible to do pagging on datalist if I don't have oledbconnection because I am creating datatable in the datatset at runtime in the following code.
ds.Tables.Add(New DataTable("search")) ds.Tables("search").Columns.Add("file_title", System.Type.GetType("System.String")) ds.Tables("search").Columns.Add("file_length", System.Type.GetType("System.String")) ds.Tables("search").Columns.Add("file_url", System.Type.GetType("System.String")) ds.Tables("search").Columns.Add("file_desc", System.Type.GetType("System.String"))
Dim row As DataRow row = ds.Tables("search").NewRow row("file_title") = filetitle row("file_desc") = temp row("file_url") = fileurl row("file_length") = filelength ds.Tables("search").Rows.Add(row)
in the search table i have added twenty rows.I want to display ten rows in one page. Please help me Thanks and Regards Amaneet Brar -
Sir, Is it possible to do pagging on datalist if I don't have oledbconnection because I am creating datatable in the datatset at runtime in the following code.
ds.Tables.Add(New DataTable("search")) ds.Tables("search").Columns.Add("file_title", System.Type.GetType("System.String")) ds.Tables("search").Columns.Add("file_length", System.Type.GetType("System.String")) ds.Tables("search").Columns.Add("file_url", System.Type.GetType("System.String")) ds.Tables("search").Columns.Add("file_desc", System.Type.GetType("System.String"))
Dim row As DataRow row = ds.Tables("search").NewRow row("file_title") = filetitle row("file_desc") = temp row("file_url") = fileurl row("file_length") = filelength ds.Tables("search").Rows.Add(row)
in the search table i have added twenty rows.I want to display ten rows in one page. Please help me Thanks and Regards Amaneet Brar -
yes u can do that simple on datagrid allow paging =true like datagrid1.allowpaging=true than there is another property datagrid.pagesize=10 i hope it will work Regards :zzz: Ahsan Ullah
-
use paged data source like this
Dim dsPaged As New PagedDataSource dsPaged.DataSource = ds.Tables(0).DefaultView dsPaged.AllowPaging = True dsPaged.PageSize = 5
it is more flexible**R A M
**