Archive for the ‘Programming’ Category
GridView Paging in ASP.NET 2.0
I am posting this on a well covered topic, because the examples I saw online were stupidly complex for this simple task. Now, I don’t mean to say that this is the most efficient method, but for smaller sets of data (we have less than 1000 records returned from this query) it is fast and easy.
Obviously, make sure you have the GridView set to allow paging. You will need to add an event handler for the GridViewPageIndexChanging (Not “Changed”). There is a private property for the class, ds which is a custom DataSet we have in our application. Any DataSet or DataTable (binding source?) will (should) work.
protected void gvUsers_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{
DataTable dt = ds.GetUsers;
gvUsers.DataSource = dt;
gvUsers.PageIndex = e.NewPageIndex;
gvUsers .DataSource = dt;
gvUsers .DataBind();
}
Where are the other Software Jedi?
This is something that is going on two years old now, but it pops into my mind every so often. How come we haven’t heard about any Mac or Linux software Jedi? Does anybody remember the Original Software Jedi and is “App a day” project? I do. I still use some of those utilities from time to time. I think my favorite is the quick kill applications.
It seems to me that nobody has wanted to step up to the plate to try and match his feat in the non-Windows world. I certainly don’t think I would be able to find the time to do it myself, so perhaps that is an issue? There has to be somebody out in the ‘verse whom is up to the task. Who knows though. I would love to see something like this go on for the Mac and Linux world. A lot of very useful stuff comes out of it and there is lots to learn. I admit that I could stand to learn some *nix and Mac coding tricks.
If I am just off my rocker, and somebody is doing this (although I find it hard to believe that I would have missed it. I mean, hell, somebody would have submitted it to digg, right?) please share with me.
Leave a Comment
Leave a Comment