Feb 20, 2018, 3:47 AM
[OPEN] [#1575] BeforeComplete... return false issue
Support,
See attached example. Simply change the combo to any other value and click off it. The Editable combo is still there. i utilized a "return false" on the BeforeComplete handler to cancel the change. However, the combo isnt hidden and the field returned to normal.
Please assist asap. We were supposed to deploy this update this evening.
thanks,
/Z
See attached example. Simply change the combo to any other value and click off it. The Editable combo is still there. i utilized a "return false" on the BeforeComplete handler to cancel the change. However, the combo isnt hidden and the field returned to normal.
Please assist asap. We were supposed to deploy this update this evening.
thanks,
/Z
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
Stt.DataSource = new object[]
{
new object[] { 0.01, ".01"},
new object[] { 0.02, ".02"},
new object[] { 0.03, ".03"},
new object[] { 0.04, ".04"},
new object[] { 0.05, ".05"},
new object[] { 0.06, ".06"}
};
Stt.DataBind();
this.GridPanel1.Store.Primary.DataSource = new object[]
{
new object[] { "[9/1/2017 2:00a] 3m777", "[9/1/2017 2:00] 3m",71.72, 0.02, 0.03, new DateTime(2017, 9, 1, 2, 0, 0) },
new object[] { "[9/1/2017 2:00a]666 3m", "[9/1/2017 2:00] 3m",71.72, 0.02, 0.03, new DateTime(2017, 9, 1, 2, 0, 0) },
new object[] { "[9/1/2017 2:05550a] 3m", "[9/1/2017 2:00] 3m",71.72, 0.02, 0.03, new DateTime(2017, 9, 1, 2, 0, 0) },
new object[] { "[9/1/2017 4442:00a] 3m", "[9/1/2017 2:00] 3m",71.72, 0.02, 0.03, new DateTime(2017, 9, 1, 2, 0, 0) }
};
this.GridPanel1.Store.Primary.DataBind();
}
}
</script>
<!DOCTYPE html>
<html>
<head id="Head2" runat="server">
<title>GridPanel with Locking Columns - Ext.NET Examples</title>
<script>
var StoreIdRenderer = function (value, metaData, record, rowIndex, colIndex, store) {
return value;
};
</script>
</head>
<body>
<ext:Store ID="Stt" runat="server" AutoLoad="true">
<Model>
<ext:Model ID="Model1" IDProperty="id" runat="server">
<Fields>
<ext:ModelField Name="id" />
<ext:ModelField Name="description" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:ResourceManager ID="ResourceManager2" runat="server" Theme="NeptuneTouch" />
<ext:Viewport ID="Viewport1" runat="server" Layout="VBoxLayout">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:GridPanel
ID="GridPanel1"
runat="server"
TitleCollapse="true"
ColumnLines="true"
Flex="1">
<Store>
<ext:Store ID="Store2" runat="server" PageSize="3000">
<Model>
<ext:Model ID="Model2" runat="server">
<Fields>
<ext:ModelField Name="company" />
<ext:ModelField Name="companySort" />
<ext:ModelField Name="price" Type="Float" />
<ext:ModelField Name="change" Type="Float" />
<ext:ModelField Name="pctChange" Type="Float" />
<ext:ModelField Name="lastChange" Type="Date" />
</Fields>
</ext:Model>
</Model>
<Grouper Property="company" SortProperty="company" Direction="ASC" />
<Sorters>
<ext:DataSorter Property="lastChange" Direction="DESC" />
</Sorters>
</ext:Store>
</Store>
<Plugins>
<ext:CellEditing ID="CellEditing1" ClicksToEdit="1" runat="server">
</ext:CellEditing>
</Plugins>
<View>
<ext:GridView ID="GridView1" runat="server">
</ext:GridView>
</View>
<ColumnModel>
<Columns>
<ext:Column runat="server" Align="Center" Text="test" CellWrap="true" Width="200" DataIndex="change">
<Renderer Handler="StoreIdRenderer" />
<Editor>
<ext:ComboBox runat="server"
ID="test1"
ValueField="id"
DisplayField="description"
QueryMode="Local"
StoreID="Stt">
<ListConfig MaxWidth="200" MinWidth="90" />
</ext:ComboBox>
</Editor>
<EditorOptions>
<Listeners>
<BeforeComplete Handler="return false;" />
</Listeners>
</EditorOptions>
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>
</Items>
</ext:Viewport>
</body>
</html>
Last edited by fabricio.murta; Feb 21, 2018 at 10:12 PM.