Fill grid based on number of rows

E

Ed

I have a new requisite from a client that wants to give the user the
option to about a databind based on number of returned rows.

if ds.rows.count < 1000 then
dg.databind()

etc.

They want a message box to popup and let the user choose to abort the
operation or let them continue with the long databind.

This is where I am at a loss as to how to display a popup asking the
user if he/she wants to continue with the long and memory intense
process. Get the value back from the popup, and bind the grid or
bypass the bind based on the return value.

Any help greatly appreciated.
 
G

Guest

Hi Ed
You can query the database for number of rows returned. If the rows
returned in above the specified limit use javascript confirm message box and
then continue with databind.
To display javascript alert use RegisterClientSide script.

Hope this is helpful.

Shailesh Jannu
MCSD .NET
 
E

Ed

Thanks for your quick response. Can you please give me a quick
example of how to call the javascript based on a certain criteria?

Thanks
 
E

Ed

Let me clarify my real problem:

I understand the registerclientside script. I understand placing it
as an attribute of a button. as in:

btnWhatEver.Attributes.Add("onclick", "return confirm(\"Whatever
Message\");");

or

btnWhatEver.Attributes.Add("onclick", "functionname()");

But the hurdle that my brain needs to overcome is the calling a script
from code, not a button event, and getting the return value from the
javascript:confirm dialog.

Thanks.
 
E

Ed

Sorry for the previous brain fart:

I should've put tags around the javascript.

This problem has me stumped.
 

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
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top