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. Image for the cookie policy date
close icon

InlineFormTemplate - grid edit inlineform-titlebar

HI


It's possible  grid edit(InlineFormTemplate)  inlineform-titlebar title 

Thanks
Pratheep

5 Replies

GV Gowthami V Syncfusion Team October 5, 2015 08:29 AM UTC

Hi Pratheep,

Thanks for contacting Syncfusion support.

As per your query we can change the title of the template using Locale property as follows,

<ej:Grid ID="Grid1" runat="server" AllowPaging="True" Locale="en-US" AllowGrouping="true" >
<EditSettings AllowAdding="true" AllowEditing="true" EditMode="InlineFormTemplate" InlineFormTemplateID="#template"/>
. . . .
. . . .
  </ej:Grid>

<script type="text/javascript">
        ej.Grid.locale["en-US"] = {
. . . .
. . . .
//Changing title while editing

EditFormTitle: "Details ",
//Changing title while adding


AddFormTitle: "Add ",
. . . .
. . . .

};
        </script>


Regards,
Gowthami V.


PR Pratheep October 5, 2015 05:43 PM UTC

Hi

Thanks for replay 

<script type="text/javascript">
    ej.Grid.locale["en-US"] = {
        EditFormTitle: "Showing records of " + [{ Field: "str_company_name" }],
        AddFormTitle: "Add new record ",

};
 </script>

here title showing (with code) - Showing records of [object Object]c-00000044

but title need to show (without code)  - Showing records of aetna(Pvt)Ltd.

Thanks
Pratheep





GV Gowthami V Syncfusion Team October 6, 2015 09:47 AM UTC

Hi Pratheep,

By default we have set the field name for the inline form title as primarykey column field. So that only while using Locale we could not change the field name of the title.

For the above scenario Locale will not work as mentioned previous response.

We have considered this requirement “EditFormTitle: Need to provide support for changing the title with non primarykey field value in Locale” as a usability issue and a support incident has been created under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

We can customize the field name of the title externally using below code example,

<ej:Grid ID="Grid1" runat="server" AllowPaging="True" AllowGrouping="true" >
               <EditSettings AllowAdding="true" AllowEditing="true" EditMode="InlineFormTemplate" InlineFormTemplateID="#template"/>
. . . .
. . . .

  <ClientSideEvents ActionComplete="complete"></ClientSideEvents>
        </ej:Grid>

<script type="text/javascript">

       

      function complete(args) {

          if (args.requestType == "beginedit")

//Setting title for the inline form

             $('#<%= Grid1.ClientID %>_inlineFormTitle').text("Showing details of " + this.getCurrentViewData()[args.rowIndex].str_company_name);
      }
  </script>



Note: Remove the code that suggested in the previous update and use the above code to achieve your requirement.

Regards,
Gowthami V.


PR Pratheep October 7, 2015 09:24 PM UTC

Hi

Thanks,it's working fine 

Pratheep


GV Gowthami V Syncfusion Team October 8, 2015 04:01 AM UTC

Hi Pratheep,
 
We are happy that the provided code working fine at your end.
 
Thanks & Regards,
Gowthami V.

Loader.
Live Chat Icon For mobile
Up arrow icon