I am new to using the Infragistics tools. I am using the Infra toolbar for my web application. I added few buttons to the toolbar and now I am trying to add click event for each of the buttons i.e calling a Server side method on the button click. I managed to find a click event for the whole toolbar but not for the individual buttons. Can anyone help me with this or give an idea where I can look for related documentation!
Attached is a part of my application code.
BackgroundImage="" BorderStyle="None" Font-Names="Arial"
ImageDirectory="/images/" ItemSpacing="0" ItemWidthDefault=""
Section508Compliant="True" Font-Bold="True" TextAlign="Right">
<SelectedStyle Font-Bold="True" ForeColor="Yellow">
</SelectedStyle>
<DefaultStyle TextAlign="Left" font-bold="True" font-italic="False">
</DefaultStyle>
<ButtonStyle BackgroundImage="" ForeColor="White">
</ButtonStyle>
Font-Names="Arial" Font-Size="8pt" ForeColor="Yellow" Font-Bold="True">
</HoverStyle>
<Items>
Text="aa" TargetURL="aa.aspx">
textalign="Left">
width="110px">
forecolor="Yellow">
</selectedstyle>
</igtbar:TBarButton>
</Items>
</igtbar:UltraWebToolbar>
Thanks,
Sari
Sari,
You've found the correct event in the ButtonClicked event. To determine which button was clicked, take a look at the "e.Button.Key" property. Since all buttons in the toolbar's Items collection must have a unique key, this provides a quick way to determine which button was clicked.
Is it possible to have some buttons handle by server-side code and others by client-side code? I've noticed that the client-side code is called followed by server-side, but for some buttons i don't won't the server-side code to be called - can i achieve this?
Thanks....
I figured it out. You set the AutoPostBack to false for the buttons you want handled in JavaScript only.
I also noticed there are at least 3 parameters passed to teh function you nominate to handle the clientside click event. Is there any documentation detailing the parameter objects? Actually, is there full documentation of the clientside behaviour? I've had a look at what is available online and i can't seem to find what i'm looking for.