We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How I can change "Save" button text on Grid's Dialog Template

Thread ID:

Created:

Updated:

Platform:

Replies:

121672 Jan 14,2016 04:15 PM Feb 16,2016 11:45 PM ASP.NET Web Forms 3
loading
Tags: Grid
Oscar Daniel Vega Castaneda
Asked On January 14, 2016 04:15 PM

I've this

...
<ej:Grid ID="RegistroIngresoGrid" runat="server"
    AllowPaging="True" AllowScrolling="True" AllowSorting="True"
    OnServerEditRow="RegistroIngresoGrid_ServerEditRow"
    OnServerAddRow="RegistroIngresoGrid_ServerAddRow"
    OnServerDeleteRow="RegistroIngresoGrid_ServerDeleteRow"
    DataSourceCachingMode="Session">
    <ClientSideEvents ActionComplete="actionComplete" EndAdd="endAdd" EndDelete="endDelete" EndEdit="endEdit" />
    <ToolbarSettings ShowToolbar="true" ToolbarItems="add,edit">
    </ToolbarSettings>
    <Columns>
        <ej:Column Field="IdRegistro" Visible="false" IsPrimaryKey="true">
        </ej:Column>
        <ej:Column Field="FechaRegistro" HeaderText="Fecha Ingreso" Format="{0:dd/MM/yyyy}" Width="100">
            <ValidationRule>
                <ej:KeyValue Key="required" Value="true" />
                <ej:KeyValue Key="date" Value="true" />
            </ValidationRule>
        </ej:Column>
        <ej:Column Field="Diagnostico" HeaderText="Diagnostico">
            <ValidationRule>
                <ej:KeyValue Key="required" Value="true" />
                <ej:KeyValue Key="minlength" Value="3" />
            </ValidationRule>
        </ej:Column>
        <ej:Column Field="Procedimiento" HeaderText="Procedimiento">
            <ValidationRule>
                <ej:KeyValue Key="required" Value="true" />
                <ej:KeyValue Key="minlength" Value="3" />
            </ValidationRule>
        </ej:Column>
        <ej:Column Field="Medico" HeaderText="Medico">
            <ValidationRule>
                <ej:KeyValue Key="required" Value="true" />
                <ej:KeyValue Key="minlength" Value="3" />
            </ValidationRule>
        </ej:Column>
        <ej:Column Field="FechaProcedimiento" HeaderText="Fecha Procedimiento" Format="{0:dd/MM/yyyy}" Width="110">
            <ValidationRule>
                <ej:KeyValue Key="required" Value="true" />
                <ej:KeyValue Key="minlength" Value="3" />
            </ValidationRule>
        </ej:Column>
 
        <ej:Column HeaderText="" IsUnbound="True" Width="70">
            <Command>
                <ej:Commands Type="Amount">
                    <ButtonOptions Text="Montos" Width="70" Click="showDialogAmounts" />
                </ej:Commands>
 
            </Command>
        </ej:Column>
    </Columns>
    <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"
        EditMode="DialogTemplate" DialogEditorTemplateID="#template"></EditSettings>
 
</ej:Grid>
...

<script type="text/template" id="template">
 
      <asp:HiddenField ID="IdRegistro" Value="{{: IdRegistro}}" runat="server" />
      <asp:HiddenField ID="IdSolicitud" Value="{{: IdSolicitud}}" runat="server" />
      <asp:HiddenField ID="TieneAlta" Value="{{: TieneAlta}}" runat="server" />
      <asp:HiddenField ID="FechaAlta" Value="{{: FechaAlta}}" runat="server" />
 
      <table style="width720pxfont-weight600text-alignleft;" class="table-responsive">
 
          <tr>
              <td>Fecha Registro:</td>
              <td>
                  <asp:TextBox ID="FechaRegistro" value="{{: FechaRegistro}}" runat="server" CssClass="form-control" Enabled="false" DateFormat="dd/MM/yyyy"></asp:TextBox>
              </td>
              <td>Fecha Procedimiento:</td>
              <td>
 
                  <asp:TextBox ID="FechaProcedimiento" value="{{: FechaProcedimiento}}" runat="server" DateFormat="dd/MM/yyyy"></asp:TextBox>
              </td>
          </tr>
          <tr>
              <td>Diagnostico:
              </td>
              <td colspan="3">
                  <asp:TextBox ID="Diagnostico" value="{{: Diagnostico}}" runat="server" CssClass="form-control"></asp:TextBox>
                  <asp:HiddenField ID="IdDiagnostico" Value="{{: IdDiagnostico}}" runat="server" />
              </td>
 
          </tr>
          <tr>
              <td>Procedimiento:</td>
              <td colspan="3">
                  <asp:TextBox ID="Procedimiento" value="{{: Procedimiento}}" runat="server" CssClass="form-control"></asp:TextBox>
                  <asp:HiddenField ID="CodigoCPT" Value="{{: CodigoCPT}}" runat="server" />
              </td>
          </tr>
 
          <tr>
              <td>Doctor:</td>
              <td colspan="3">
                  <asp:TextBox ID="Medico" value="{{: Medico}}" runat="server" CssClass="form-control"></asp:TextBox>
                  <asp:HiddenField ID="CodPres" Value="{{: CodPres}}" runat="server" />
 
              </td>
          </tr>
 
 
      </table>
  </script>

That's work but I need change button text Save and Cancel, how I can do that?

 

Ajith R [Syncfusion]
Replied On January 15, 2016 01:22 AM

Hi Daniel,

Thanks for using Syncfusion products.

Query: I need change button text Save and Cancel, how I can do that?

We suggest you to change the SaveButton  and CancelButton properties in ej.Grid.Locale with corresponding culture and assign culture code to the Grid Locale API. Please refer the below code snippet for further details.


<script type="text/javascript">

        ej.Grid.Locale["es-ES"] = {

            SaveButton: "Ahorrar",

            CancelButton: "Cancelar"

        }
</script>

<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" Locale="es-ES">

        ---------

        ---------
</ej:Grid>


Note: We have to refer the corresponding culture script in the application to perform localization in the Grid.

Please refer the below UG and KB links for further details.

UG: http://help.syncfusion.com/js/grid/globalizationandlocalization

KB: https://www.syncfusion.com/kb/4008/how-to-enable-localization-in-grid

Please let us know if you have any concerns.

Regards,
Ajith R

Oscar Daniel Vega Castaneda
Replied On February 16, 2016 11:06 AM

Thank you!!! awesome!! thats resolve my issue!!

Balaji Sekar [Syncfusion]
Replied On February 16, 2016 11:45 PM

Hi Oscar, 

We are happy that the provided suggestion helped you. 
Please get back to us if you need any further assistance.  

Regards, 
Balaji S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;