Hi,
I have added a Webcombo and binded the values to it. And I have added a SelectedRowChanged event for webcombo. All are working fine. But I want to cancel the postback of the webcombo if it fails in certain condtion. I dont know how to use this...
here is my combo control
<igcmbo:WebCombo ID="wbcFacilityReq" runat="server" BackColor="White" BorderColor="#7F9DB9"
BorderStyle="Solid" BorderWidth="1px" ForeColor="Black" SelBackColor="Transparent"
SelForeColor="Black" Version="4.00" DisplayValue="" Editable="True" Width="220px" OnSelectedRowChanged="wbcFacilityReq_SelectedRowChanged">
<ExpandEffects ShadowColor="LightGray" />
<DropDownLayout BorderCollapse="Separate" ColHeadersVisible="No" ColWidthDefault="205px"
DropdownWidth="210px" RowHeightDefault="20px" RowSelectors="No" Version="4.00"
XmlLoadOnDemandType="Synchronous">
<HeaderStyle BackColor="LightGray" BorderStyle="Solid">
<BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
</HeaderStyle>
<FrameStyle BackColor="LightGray" BorderStyle="Ridge" BorderWidth="2px" Cursor="Default"
Font-Names="Verdana" Font-Size="10pt" Height="130px" Width="210px">
</FrameStyle>
<RowStyle BackColor="White" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px">
<BorderDetails WidthLeft="0px" WidthTop="0px" />
</RowStyle>
<SelectedRowStyle BackColor="DarkBlue" ForeColor="White" />
</DropDownLayout>
<Columns>
<igtbl:UltraGridColumn>
<header caption="Column0"></header>
</igtbl:UltraGridColumn>
</Columns>
<ClientSideEvents AfterSelectChange="wbcFacilityReq_AfterSelectChange" />
and wbcFacilityReq_AfterSelectChange fucntion ...
//Add code to handle your event here.
if(some_condition == false)
{
Here I need to block the postback.... How can I do this?....
}
Returning true from the event is usually what is needed to cancel the event.
Hi Darrell,
sorry its not helped me....
we can have some code like event.cancel = true for IG text edit. Is there any thing available for this?
Hello,
If you want to avoid a postback, all you have to do is return true inside of the AftarSelectChange clientside event.
function WebCombo1_AfterSelectChange(webComboId)
Returning true will cause any events after this not to propogate thus causing the serverside SelectChanged not to fire.
If the solution above does not work, please contact Developer Support and send a sample to them so they can take a look at why return true; does not work.
Hope this helps,
Steve
Corporate Trainer
Infragistics Inc.
I want to block the postback from AfterSelectChange event of Webcombo.... I have already provided you the example in my previous posts. Please check that one...
I want a workable solution....
I don't know what else I can tell you, returning true is how events are normally cancelled from the client. If you have a sample I would submit it to Developer Support so they could see what you are doing.