I want to place the webcombo in EditRowTemplate. Now i am able to place the webcombo in the EditRowTemplate. But after selecting the values from the webcombo in the EditRowTemplate, the EditRowTemplate get's closed.The EditRowTemplate should close only when clicks the "Ok" or "Cancel" button in EditRowTemplate. I don't want to go for the ASP.Net Dropdown list in the EditRowTemplate.please help me on this regard. Please help me on this regard.
This is an issue I've seen before. The drop-down area of most drop-down controls is considered to be part of the "body" element and thus not in the row edit template, as far as the browser is concerned. Once the user clicks on anything that isn't inside the row edit template, the template closes.
The workaround is to add some code to the grid's client-side BeforeRowTemplateClose event handler, to cancel the event whenever your WebCombo triggers the close.
function UltraWebGrid1_BeforeRowTemplateCloseHandler(gridName, rowId, bSaveChanges){ var grid = igtbl_getGridById(gridName); var combo = igcmbo_getComboById("<%= WebCombo1.ClientID %>"); var localEvent = (typeof(event)!='undefined') ? event : grid.event; var localSrcElem = localEvent.srcElement ? localEvent.srcElement : localEvent.target; if (localEvent && localSrcElem && igtbl_contains(combo.container,localSrcElem)) return true;}
Hi,
The name 'WebCombo1' does not exist in the current context". I have declared the webcombo inside the <RowEditTemplate>. please suggest me to solve this issue.
<p align="right">
<igcmbo:webcombo id="WebCombo1'" runat="server" Version="4.00" DataValueField="COPS Item Number" DataTextField="COPS Item Number" EnableXmlHTTP="True" OnInitializeDataSource="wcCOPS_InitializeDataSource" >
<DropDownLayout BorderCollapse="Separate" RowHeightDefault="20px" RowsRange="20" Version="4.00" >
<RowStyle BorderWidth="1px" BorderColor="Gray" BorderStyle="Solid" BackColor="White">
<BorderDetails WidthLeft="0px" WidthTop="0px"></BorderDetails>
</RowStyle>
<SelectedRowStyle ForeColor="White" BackColor="DarkBlue"></SelectedRowStyle>
<HeaderStyle BorderStyle="Solid" BackColor="LightGray">
<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails>
</HeaderStyle>
<FrameStyle Width="325px" Cursor="Default" BorderWidth="2px" Font-Size="10pt" Font-Names="Verdana" BorderStyle="Ridge" BackColor="Silver" Height="130px"></FrameStyle>
</igcmbo:webcombo>
</p>
<br />
<p align="center">
<input id="igtbl_reOkBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px"
type="button" value="OK" />
<input id="igtbl_reCancelBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px"
type="button" value="Cancel" /></p>
I'm not sure why this exception is occurring. It's possible that you can't use the declarative syntax to refer to the WebCombo directly in the ASPX page as I'd mentioned in my previous post.
I suggest that you submit a support request for further assistance on this issue, as it will take more in-depth, personalized attention than we can provide over the forums.