ButtonConfiguration take no effect

Topics: UI Framework
Aug 24, 2010 at 7:44 AM

when i add a new button in button panel, i set OnClientClick as your example code, however, it take no effect besides a no message popup window. the code snippet is shown below.

<Button CommandArgument="View test" Type="Button" Text="View test" >

<OnClientClick returnValue ="window.confirm('Are you sure to delete the record? ')" />

</Button>

question 1

if there is any matters need attention, please let me know.

and

question 2

with no GridSelectionRequired configurated, when user click the button in button panel ,  whether it don't need to select one row in GridView Panel before Aggregate Panel is shown.

Coordinator
Aug 24, 2010 at 8:53 AM

#1, You may try <OnClientClick returnValue ="return window.confirm('Are you sure to delete the record? ')" /> instead.

#2, please check with DynamicPage.xsd for comment of the element GridSelectionRequired. It's used to validate whether the user has selected some records in grid before sending request to web services. If there is no, the message from the internal element WarningMessage is shown up.

Aug 25, 2010 at 4:25 AM

#1,the problem is same as before.

Coordinator
Aug 25, 2010 at 12:21 PM

Sorry, I gave you a incorrect answer at first. Please take a look at DynamicPage.xsd for the configuration comment as below,

The JavaScript block executed in the browser when the user clicks the button before executing Action.
The request is sent to the server only when the configured JavaScript block setting the variable "returnValue" to true.
A sample javascript code block likes "returnValue = window.confirm('Are you sure to delete the record?');"