i trying bind repeater dataview not showing me data in dataview when see through breakpoint
private void get_data() { string file = server.mappath("blogcontent.xml"); dataset ds = new dataset(); ds.readxml(file); dataview dv = new dataview(ds.tables[0]); datatable dt = dv.table; viewstate.add("mytable", dt); } private void bind_data(int take, int pagesize) { pageddatasource page = new pageddatasource(); page.allowcustompaging = true; page.allowpaging = true; datatable dtv = (datatable)viewstate["mytable"]; dataview dv = new dataview(); dv = dtv.defaultview; dv.rowfilter = "id>=" + pagesize + " , " + "id<=" + take; page.datasource = dv; page.pagesize = psize; repeater1.datasource = page; repeater1.databind(); if (!ispostback) { int rowcount = dtv.rows.count; createpagingcontrol(rowcount); } } pageddatasource page = new pageddatasource(); page.allowcustompaging = true; page.allowpaging = true; datatable dtv = (datatable)viewstate["mytable"]; dataview dv = new dataview(); dv = dtv.defaultview; dv.rowfilter = "id>=" + pagesize + " , " + "id<=" + take; page.datasource = dv; page.pagesize = psize; repeater1.datasource = page; repeater1.databind(); if (!ispostback) { int rowcount = dtv.rows.count; createpagingcontrol(rowcount); }
please check , tell me going wrong.. try add paging in repeater control number of paging display data not fetching in dataview . when check datatable filling when comes dataview shows me nothng
i got answers.. order of id in xml not in correct in xml id of each node like
5 3 4 1 2
i correct 1 2 3 4 5
and working ....
Comments
Post a Comment