Hi! I have a page with an update panel. I'm not using your callback panel because I also have a custom control that doesn't work inside your panel.
My problem is that my Grid using a CustomColumn with a select box, doesn't fire the
ClientSideEndEdit & ClientSideBeginEdit javascript event when I edit my cell. If I remove the update panel of the page, it's working. Do you know why it can't fired Javascript event?
This part of the code is in a CustomServerControl inserted in an aspx page. The update panel is in the aspx page for the whole application.
Code: HTML/ASPX
<script type="text/javascript">
var g_curItemIndex = -1;
function beginEdit(cell) {
g_curItemIndex = cell.getItemIndex();
var v = cell.getValue();
var dropDownBox = document.getElementById("seanceTypeList");
for (var i = 0; i < dropDownBox.options.length; i++) {
if (dropDownBox.options[i].value == v) {
dropDownBox.selectedIndex = i;
return;
}
}
dropDownBox.selectedIndex = 0;
}
function endEdit(cell) {
var dropDownBox = document.getElementById("seanceTypeList");
var selectedIndex = dropDownBox.selectedIndex;
if (selectedIndex > 0) {
return dropDownBox.options[selectedIndex].value;
}
return null;
}
</script>
<eo:Grid ID="seanceGrid" KeyField="SeanceID" runat="server" GridLines="Both" GridLineColor="0, 51, 0"
ForeColor="#003300" Font-Names="Verdana" BorderStyle="Solid" BorderWidth="1px"
Font-Size="8.75pt" FullRowMode="False" Font-Bold="False" Font-Italic="False"
Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Height="500px"
ItemHeight="50" Width="680px" AllowNewItem="True" AllowPaging="True">
<ColumnHeaderStyle CssText="text-align: left; padding-top: 3px; color: #003300; font-weight: bold; background: #ffffff url('./Images/GridHeader-Bg.png') repeat-x;">
</ColumnHeaderStyle>
<Columns>
<eo:CustomColumn HeaderText="Type" Width="100" DataField="Description" ClientSideEndEdit="endEdit"
ClientSideBeginEdit="beginEdit">
<CellStyle CssText="text-align: left; padding-top: 2px; padding-right: 2px;" />
<EditorTemplate>
<select id="seanceTypeList" style="width: 100px">
<option>Choisir</option>
<asp:Repeater runat="server" ID="seanceTypeRepeater">
<ItemTemplate>
<option value='<%#DataBinder.Eval(Container.DataItem, "Description")%>'>
<%#DataBinder.Eval(Container.DataItem, "Description")%>
</option>
</ItemTemplate>
</asp:Repeater>
</select>
</EditorTemplate>
</eo:CustomColumn>
</Columns>
</eo:Grid>