Feb 10, 2010, 8:33 AM
Colum editor Focus
I have a "GridPanel" and that "GridPanel" a column containing an "Editor" with a "combobox" in, so far so good, the problem is that when I change the option in "combobox", I need to save to record this information in the database, and for that I click on a "GridCommand" called SAVE.The problem is that I need to double click on the SAVE button, because the focus is still on the combo. What can I do to fix this?
My code follows:
Thank anyone who can give me a light on this.
Angelo
My code follows:
<ext:GridPanel
ID="grdChamados"
runat="server"
AutoExpandColumn="Chamado_cd"
StoreID="Chamados_Store"
Border="false"
Height="300"
>
<%--<View>
<ext:GridView ID="GridView1" runat="server" MarkDirty="false" />
</View>--%>
<ColumnModel ID="ColumnModel2" runat="server">
<Columns>
<ext:Column ColumnID="Chamado_cd" Width="60px" Header="Código" Sortable="true" DataIndex="Chamado_cd" />
<ext:Column Header="Titulo" Width="150" Sortable="true" DataIndex="Titulo"/>
<ext:Column Header="Data de Criação" Width="70" Sortable="true" DataIndex="DataCriacao">
<Renderer Fn="Ext.util.Format.dateRenderer('d/m/Y')" />
</ext:Column>
<ext:Column Header="Data final prevista" Width="70" Sortable="true" DataIndex="DataPrevisaoEncerramento">
<Renderer Fn="Ext.util.Format.dateRenderer('d/m/Y')" />
</ext:Column>
<ext:Column Header="Status" Width="100" Sortable="true" DataIndex="Status" />
<ext:Column Header="Chamado encerrado" Width="100" Sortable="true" DataIndex="ChamadoEncerrado" />
<ext:Column Header="Prioridade" Width="100" Sortable="true" DataIndex="Prioridade" >
<Editor>
<ext:ComboBox
ID="cboPrioridade"
runat="server"
StoreID="Prioridades_Store"
ValueField="Prioridade_Chamado_cd"
DisplayField="Prioridade"
TypeAhead="true"
Mode="Local"
ForceSelection="true"
TriggerAction="All" >
<Listeners>
<Change Handler="#{PrioridadeHidden}.setValue(#{cboPrioridade}.getValue());" />
</Listeners>
</ext:ComboBox>
</Editor>
</ext:Column>
<ext:CommandColumn Width="70">
<Commands>
<%-- <ext:GridCommand Icon="Delete" CommandName="Delete">
<ToolTip Text="Apagar" />
</ext:GridCommand>--%>
<ext:CommandSeparator />
<ext:GridCommand Icon="NoteEdit" CommandName="Edit">
<ToolTip Text="Editar" />
</ext:GridCommand>
<ext:GridCommand Icon="Disk" CommandName="Salvar">
<ToolTip Text="Salvar" />
</ext:GridCommand>
</Commands>
</ext:CommandColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel2" runat="server" SingleSelect="true">
<%--<AjaxEvents>
<RowSelect OnEvent="RowSelect" Buffer="250">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{Details}" />
<ExtraParams>--%>
<%-- or can use params[2].id as value --%>
<%--<ext:Parameter Name="values" Value="Ext.encode(#{GridPanel2}.getRowsValues())" Mode="Raw" />
</ExtraParams>
</RowSelect>
</AjaxEvents>--%>
</ext:RowSelectionModel>
</SelectionModel>
<Listeners>
<Command Handler="Coolite.AjaxMethods.Salvar(command,record.data.Chamado_cd,record.data.Titulo);" />
</Listeners>
<BottomBar>
<ext:PagingToolBar
ID="PagingToolBar2"
runat="server"
PageSize="10"
StoreID="Chamados_Store"
/>
</BottomBar>
<LoadMask ShowMask="true" />
</ext:GridPanel>
Thank anyone who can give me a light on this.
Angelo