|
Rank: Member Groups: Member
Joined: 2/6/2010 Posts: 22
|
Hi I have the toolbar set to AutoPostBack="true"
but when I click a button the tool bar it doen't set off the RequiredFieldValidator. If I place a asp button on the page it works, just not when I click the button on the toolbar.
Any Ideas Many Thanks
Mark
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Thanks for the information. I have confirmed that the ToolBar control currently does not trigger validation. We will look into it and see if we can add that.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 2/6/2010 Posts: 22
|
Hi Thanks for the update.
Should I be able to add a custom item to the toolbar, say a <asp:Button then use that for the validation.
Been looking into this but can't quite get it to add, but i'm still looking! Many Thanks
Mark
|
|
Rank: Member Groups: Member
Joined: 2/6/2010 Posts: 22
|
Hi this seems to work!
<eo:ToolBarItem Type="Custom"> <CustomItem> <asp:Button ID="Button2" runat="server" Text="Button" /></CustomItem> </eo:ToolBarItem>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Cool. Glad that it works for you!
|
|
Rank: Member Groups: Member
Joined: 2/6/2010 Posts: 22
|
Hi again
It worked in that it makes the validation work, but then doesn't do a postback if it a <CustomItem> once the validation is meet.
any ideas?
Many Thanks
Mark
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Please try the following code:
Code: HTML/ASPX
<eo:ToolBar ClientSideOnItemClick="toolbar_click_handler" ...>
....
</eo:ToolBar>
Code: JavaScript
function toolbar_click_handler()
{
//Returns false to cancel AutoPostBack if validation failed
if (!Page_ClientValidate())
return false;
}
Thanks!
|
|
Rank: Member Groups: Member
Joined: 2/6/2010 Posts: 22
|
many thanks support. Thats all working now.
|
|