GridView Binding

S

Smash

I have problem binding gridview....

At first i didn't want to bind gridview at first page load...so in my
objectdatasource_selecting event i wrote this:

If Not Page.IsPostBack Then
e.Cancel = True
End If

Thats solved the problem for the first bind....

Now I have date textbox on my form, a imagebutton for my calendar popup
taht fills date textbox and a button for showing results....on button
click i call gridview.databind and results show ok...

the problem is when I try to select date with my calendar...postback
happens and also gridview bind happens..AND I DON'T WANT THAT...i don't
want to bind my grid with new parameter in my date textbox...i want to
bind my grid when selecting a button...

so how can i prevent binding of gridview when doing postback execpt
when clicking on the button

any help appreciated

thx
 
S

Smash

I forgot to say....it is important that after clicking on calendar
imgbtn gridview reloads results from viewstate and not disappear...only
after clicking button gridview takes newly defined parameters from date
textbox
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top