Nov 12, 2014, 3:35 AM
[CLOSED] Cellediting Text toUpperCase after edit with keypress enter
Hi, I want to change all texts to UpperCase but when I do double click and edit my text with lowercase and after I press the key "enter" this is not working but, when I do click in other place this is working, Can I help me with convert to UpperCase when I press the key enter to finish cell edit?
protected void Page_Load(object sender, EventArgs e)
{
List<GrupoMenu> lGrupoMenu = new List<GrupoMenu>();
for (int i = 0; i <= 5; i++)
{
GrupoMenu oGrupoMenu = new GrupoMenu();
oGrupoMenu.ID = "id" + i;
oGrupoMenu.Descripcion = "descripci?n" + i;
lGrupoMenu.Add(oGrupoMenu);
}
sGruposMenu.DataSource = lGrupoMenu;
sGruposMenu.DataBind();
}
public class GrupoMenu
{
public string ID
{
get;
set;
}
public string Descripcion
{
get;
set;
}
}
<ext:GridPanel
ID="gpGruposMenu"
runat="server"
Height="420"
Width="960"
Title="GRUPOS MEN?"
EnableColumnHide="false"
EnableColumnMove="false"
Header="true"
TitleAlign="Left">
<Store>
<ext:Store
ID="sGruposMenu"
runat="server">
<Model>
<ext:Model ID="mGruposMenu" runat="server">
<Fields>
<ext:ModelField Name="ID" Type="String" />
<ext:ModelField Name="Descripcion" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column
ID="cID"
runat="server"
Text="ID"
Align="Center"
Width="100"
DataIndex="ID">
<Editor>
<ext:TextField
ID="txtID"
runat="server"
MaxLength="3"
EnforceMaxLength="true">
<Listeners>
<Blur Handler="App.txtID.setValue(App.txtID.getValue().toUpperCase());" />
</Listeners>
</ext:TextField>
</Editor>
</ext:Column>
<ext:Column
ID="cDescripcion"
runat="server"
Text="DESCRIPCI?N"
Align="Left"
Width="858"
DataIndex="Descripcion">
<Editor>
<ext:TextField
ID="txtDescripcion"
runat="server"
MaxLength="50"
EnforceMaxLength="true">
<Listeners>
<Blur Handler="App.txtDescripcion.setValue(App.txtDescripcion.getValue().toUpperCase());" />
</Listeners>
</ext:TextField>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<View>
<ext:GridView
ID="gvGruposMenu"
runat="server"
StripeRows="true"
AllowDeselect="true">
</ext:GridView>
</View>
<Plugins>
<ext:CellEditing ID="ceGruposMenu" runat="server" ClicksToEdit="2">
<Listeners>
<BeforeEdit Handler="console.log('before edit');" />
<Edit Handler="console.log('before edit');" />
<ValidateEdit Handler="console.log('before edit');" />
</Listeners>
</ext:CellEditing>
</Plugins>
<SelectionModel>
<ext:RowSelectionModel
ID="rsmGruposMenu"
runat="server"
AllowDeselect="true">
</ext:RowSelectionModel>
</SelectionModel>
</ext:GridPanel>
Regards
Last edited by Daniil; Nov 13, 2014 at 6:51 AM.
Reason: [CLOSED]