Dec 12, 2016, 4:42 PM
[CLOSED] componentID shows in combo text
Support,
See complete example below.
The problem is that the component id is showing int he textfield part of the combo.
to reproduce, run the example. Then load then page. Click the add row button and a new row will appear. Click the editable combo (in the new row), and you will see the component Id in the dropdown.
This is confusing the users. i expect that this will NOT show and the textfield part is blank.
Thanks,
/Z
See complete example below.
The problem is that the component id is showing int he textfield part of the combo.
to reproduce, run the example. Then load then page. Click the add row button and a new row will appear. Click the editable combo (in the new row), and you will see the component Id in the dropdown.
This is confusing the users. i expect that this will NOT show and the textfield part is blank.
Thanks,
/Z
<%@ Page Language="C#" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>GridPanel Row with ToolTip - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<script>
var rowInsertCounter = -1;
var runMe = function () {
var newdet = {
id: 1, description: 'test'
};
App.StoreTestDetails.add(newdet);
var newdet2 = {
id: 2, description: 'test2'
};
App.StoreTestDetails.add(newdet2);
var newRecord = {
myTestValueId: 1, name: 'test', description: 'test'
};
App.GridPanelTestDetails.getStore().add(newRecord);
var newRecord = {
myTestValueId: 2, name: 'test1', description: 'test1'
};
App.GridPanelTestDetails.getStore().add(newRecord);
var newRecord = {
myTestValueId: 2, name: 'test2', description: 'test2'
};
App.GridPanelTestDetails.getStore().add(newRecord);
};
var generateNewTestRow = function (grid) {
rowInsertCounter -= 1;
var newRecord = {
id: rowInsertCounter, description: ''
};
grid.getStore().add(newRecord);
}
var editTestDetailsRenderer = function (value, metaData, record, rowIndex, colIndex, store) {
var r = App.StoreTestDetails.getById(value);
if (Ext.isEmpty(r)) {
return record.data.description;
}
return r.data.description;
};
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
<Listeners>
<DocumentReady Handler="runMe()" />
</Listeners>
</ext:ResourceManager>
<ext:Store ID="StoreTestDetails" runat="server" AutoLoad="false">
<Model>
<ext:Model ID="Model1" IDProperty="id" runat="server">
<Fields>
<ext:ModelField Name="id" />
<ext:ModelField Name="description" />
</Fields>
</ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="description" Direction="ASC" />
</Sorters>
</ext:Store>
<ext:Window
ID="WindowEditTestDetails"
runat="server"
Icon="ApplicationFormAdd"
Layout="VBoxLayout"
Width="400"
Hidden="false"
Modal="true"
Title="Edit Test Details">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" Pack="Start"/>
</LayoutConfig>
<Items>
<ext:GridPanel
ID="GridPanelTestDetails"
runat="server"
AutoScroll="true">
<Store>
<ext:Store runat="server"
AutoLoad="false">
<Model>
<ext:Model IDProperty="myTestValueId" runat="server">
<Fields>
<ext:ModelField Name="name" Type="String"/>
<ext:ModelField Name="myTestValueId" Type="Int"/>
<ext:ModelField Name="description" Type="String"/>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ID="Column1" runat="server" Text="Test Code" Width="120" DataIndex="myTestValueId">
<Renderer Fn="editTestDetailsRenderer" />
<Editor>
<ext:ComboBox ID="ComboBox1"
runat="server"
DisplayField="description"
ValueField="id"
StoreID="StoreTestDetails"
QueryMode="Local">
</ext:ComboBox>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
</SelectionModel>
<Plugins>
<ext:CellEditing ID="CellEditing1" ClicksToEdit="1" runat="server" />
</Plugins>
<BottomBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:Button ID="Button1" Text="Add Row" runat="server" Icon="Add">
<Listeners>
<Click Handler="generateNewTestRow(App.GridPanelTestDetails);" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:GridPanel>
</Items>
</ext:Window>
</form>
</body>
</html>
Last edited by fabricio.murta; Dec 15, 2016 at 12:41 PM.