DataGrid in ASP.NET
-
I have a DataGrid in the web form,in
Page_Load
I bind it to a datasource.This database is very larg so I make thePageStyle
availabe,when I run my form, the first five rows appeare but if I click the next in pagerstyle nothing happend and it doesn't show next records.Should I add any code for this feature? Thanks Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
I have a DataGrid in the web form,in
Page_Load
I bind it to a datasource.This database is very larg so I make thePageStyle
availabe,when I run my form, the first five rows appeare but if I click the next in pagerstyle nothing happend and it doesn't show next records.Should I add any code for this feature? Thanks Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
Yes, you have to handle the OnPageIndexChanged Event and bind the data again with setting the CurrentPageIndex property to the selected page index. See, OnPageIndexChanged Event help in MSDN documentation. They have a sample also. omkamal
-
I have a DataGrid in the web form,in
Page_Load
I bind it to a datasource.This database is very larg so I make thePageStyle
availabe,when I run my form, the first five rows appeare but if I click the next in pagerstyle nothing happend and it doesn't show next records.Should I add any code for this feature? Thanks Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975Mazdak wrote: Should I add any code for this feature? Yes you have to add your own code (as the other guy said). But on that note I was highly disapointed when I tried the DataGrid for the first time and figured out that all it did re: the Paging was put in the link really. What a cheek. It can't take MS more than a few minutes to add in the extra code. Anyway. I was wondering if it was possible to inherit the DataGrid and make my own ASP.NET Webform Control which had the Paging code built in? I would think it is possible but before I start banging my head away at it I would like some confirmation. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront
-
Mazdak wrote: Should I add any code for this feature? Yes you have to add your own code (as the other guy said). But on that note I was highly disapointed when I tried the DataGrid for the first time and figured out that all it did re: the Paging was put in the link really. What a cheek. It can't take MS more than a few minutes to add in the extra code. Anyway. I was wondering if it was possible to inherit the DataGrid and make my own ASP.NET Webform Control which had the Paging code built in? I would think it is possible but before I start banging my head away at it I would like some confirmation. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront
Paul Watson wrote: I would think it is possible but before I start banging my head away at it I would like some confirmation. This is my confirmation :);) Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975