I had to recently implement infragistics web panel. Web panel Infragistics has two client side events, ExpandStateChanging and ExpandStateChanged
If you have to do some simple client side validation on web panels say for example expand one web panel and collapse the rest on the page...without posting back, the key is:
A simple thing..but since it was new, i was searching for while and as they say, if you don't know something..you have to RTFM.. thts exactly what i did and used some commonsense too..
igpnl_getPanelById('<%= household_panel.ClientID %>').setExpanded(false);
where igpnl_getPanelById is an inbuilt infragistics function to find the control.
The regular document.getElementById does not work.
The event setExpanded expands (true) or collapses (false).
script id="igClientScript" type="text/javascript"
function general_panel_ExpandedStateChanging(oWebPanel, oEvent)
{
igpnl_getPanelById('<%= h_panel.ClientID %>').setExpanded(false);
igpnl_getPanelById('<%= e_panel.ClientID %>').setExpanded(false);
igpnl_getPanelById('<%= a_panel.ClientID %>').setExpanded(false);
igpnl_getPanelById('<%= pro_panel.ClientID %>').setExpanded(false);
if (oWebPanel.getExpanded() == true)
document.getElementById('<%= general_panel.ClientID %>').title = "Click arrow to the right to expand and close this description.";
else
document.getElementById('<%= general_panel.ClientID %>').title = "";
//Not calling this will do a postback to the server..
oEvent.cancelPostBack = true;
}
// -->
/script
Tuesday, June 10, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment