PDA

View Full Version : GridPanel ComboBox Bug



Timothy
Dec 03, 2008, 10:35 AM
Hello,

The below example and replication steps should indicate a bug with an Editable ComboBox in a GridPanel:

Example.aspx:


<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Store1.DataSource = new object[] {
new object[] { "Timothy", "Cool" }
};
Store1.DataBind();
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Example Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" EnablePartialRendering="True" />
<ext:ScriptManager runat="server" StateProvider="PostBack" />

<ext:Store ID="Store1"
runat="server"
AutoLoad="False">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="Customer" />
<ext:RecordField Name="Value" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
<ext:GridPanel ID="GridPanel1"
runat="server"
StoreID="Store1"
AutoHeight="True"
AutoWidth="True">
<ColumnModel>
<Columns>
<ext:Column ColumnID="Customer" DataIndex="Customer" Header="Customer" />
<ext:Column ColumnID="Value" DataIndex="Value" Header="Value">
<Editor>
<ext:ComboBox runat="server"
Editable="True">
<Items>
<ext:ListItem Text="Word" Value="Word" />
<ext:ListItem Text="Word 2" Value="Word 2" />
<ext:ListItem Text="Word 3" Value="Word 3" />
</Items>
</ext:ComboBox>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel runat="server" />
</SelectionModel>
</ext:GridPanel>


</form>
</body>
</html>


Replication steps:

1. Load page
2. Click "Cool" and change to "Word" or "Word 2"
3. Works
4. Reload page
5. Click "Cool" and type "Hello World" into ComboBox
6. Value reverted back to "Cool"

Cheers,
Timothy

Timothy
Dec 08, 2008, 9:57 AM
Any update on resolve, or can someone confirm this is actually how it's supposed to work?

Cheers,
Timothy

methode
Dec 08, 2008, 11:17 AM
Hi Timothy,

I think it is supposed to work in this manner. After you change text in combo box and then press save (to save row),
at that moment I would check if it takes what you've written in combobox... but don't exactly know.

Matteo

Timothy
Dec 08, 2008, 11:53 AM
methode (12/8/2008) Hi Timothy,

I think it is supposed to work in this manner. After you change text in combo box and then press save (to save row),
at that moment I would check if it takes what you've written in combobox... but don't exactly know.

Matteo


I would expect the functionality would hold and show the modified value until Save is actually issued; seems a little inconsistent with other controls like the text box or date change ;)

Cheers,
Timothy

geoffrey.mcgill
Dec 08, 2008, 12:04 PM
yes, I do believe there is a problem. I thought it was going to be a quick easy fix, but it does now appear to be more involved. 

We're looking into this. 

Timothy
Dec 08, 2008, 12:22 PM
geoffrey.mcgill (12/8/2008)yes, I do believe there is a problem. I thought it was going to be a quick easy fix, but it does now appear to be more involved.

We're looking into this.





Thanks, that's all I need Geoffrey ;)

Cheers,
Timothy