Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Thursday, November 29, 2007

How to implement Ajaxified details view hide on PageIndexChanging

Previously I showed how to enable DetailsView with a Select button (link). But here is how to get rid of the DetailsView if Paging is enabled by using the PageIndexChanging method.

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
// get rid of the details view
DetailsView1.DataSource = null;
DetailsView1.DataBind();

GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
To Ajaxify it within an update panel, add a Trigger for the Gridview1 object and the PageIndexChanging event.

5 comments:

Anonymous said...

...please where can I buy a unicorn?

Anonymous said...

...please where can I buy a unicorn?

Anonymous said...

[url=http://italtubi.com/tag/levitra-10-mg/ ]compra levitra onlin [/url] yvPenso che questo sia una splendida idea acquistare levitra leicmzdpeg [url=http://www.mister-wong.es/user/COMPRARCIALIS/comprar-viagra/]comprar viagra[/url]

Anonymous said...

Good day!

I am new to this forum and look forward to making some new friends

so how is everyone doing? Dennis from [url=http://www.myonlinepayday.com]Online Payday Loans[/url] website!

Anonymous said...

slunseHiedeed xaikalitag Arempseup [url=http://uillumaror.com]iziananatt[/url] Abormthoumb http://gusannghor.com Darpoormacync