Monday, May 24, 2010

I want to change query of Data grid during the run time in ASP.Net. How?

Hello


I m connecting radGrid or C1Grid in asp.net2 from the Page_Load(). Its not working properly. Problen is that its shows data at first page. But when I clicks on 2nd or else then its not shows data. Grid becomes plance.





But when I used ASP.Net SQLDatasource components and writes SQL Query here its work well. I dont know why? But I want to place a search option in the same page to search data from database.





How can I change query of SQLdatasource component at run time that can solve my problem.





thanks

I want to change query of Data grid during the run time in ASP.Net. How?
Not sure if I'm understanding the question correctly, but I'm gathering you want to run a query on post back? Your Page_Load action of the page should go like this:





private void Page_Load(object sender, EventArgs e)


{


if(IsPostBack)


{


//your code here


}


}

pollen

No comments:

Post a Comment