By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,992 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,992 IT Pros & Developers. It's quick & easy.

Fill grid based on number of rows

P: n/a
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.
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

"Ed" wrote:
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.

Nov 18 '05 #2

P: n/a
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
On Mon, 16 Aug 2004 17:25:03 -0700, "shailesh"
<sh******@discussions.microsoft.com> wrote:
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

"Ed" wrote:
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.


Nov 18 '05 #3

P: n/a
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.
On Tue, 17 Aug 2004 01:11:39 GMT, Ed <ed@dodgeit.com> wrote:
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
On Mon, 16 Aug 2004 17:25:03 -0700, "shailesh"
<sh******@discussions.microsoft.com> wrote:
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

"Ed" wrote:
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.


Nov 18 '05 #4

P: n/a
Ed
Sorry for the previous brain fart:

I should've put tags around the javascript.

This problem has me stumped.


On Tue, 17 Aug 2004 01:30:57 GMT, Ed <ed@dodgeit.com> wrote:
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.
On Tue, 17 Aug 2004 01:11:39 GMT, Ed <ed@dodgeit.com> wrote:
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
On Mon, 16 Aug 2004 17:25:03 -0700, "shailesh"
<sh******@discussions.microsoft.com> wrote:
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

"Ed" wrote:

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.


Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.