Delayed databinding

S

StickMonster

I've got a gridview wired up to a sqldatasouce. What's the right way to
delay databinging so that it occurs on an event, like a button click, instead
of page_load?
 
J

Joe Fawcett

StickMonster said:
I've got a gridview wired up to a sqldatasouce. What's the right way to
delay databinging so that it occurs on an event, like a button click,
instead
of page_load?
Set up and call databinding in code and call this from within the event
handler.
grvData.DataSourceID = myDataSourceID;
grvData.DataBind();
 

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

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,422
Latest member
LatashiaZc

Latest Threads

Top