Issue in grid content

Hi,

  I need to render a tag inside another tag in grid,like shown below 1st one which is dynamically attached to div tag in grid structure we can't add the tag manually or we can't have any script to do this since it is grid it comes automatically,Is there any possibility to do or do we have any mode kind of thing to use in grid structure so that it will attach span tag inside div one

 

1)<div class="e-headercelldiv" data-ej-mappingname="ExtractName" style="text-align: left;">Extract Name <span class="e-icon e-descending e-rarrowdown-2x"> </span></div>

What we are getting is Below one

<div class="e-headercelldiv" data-ej-mappingname="ExtractName" style="text-align: left;">Extract Name</div><span class="e-icon e-ascending e-rarrowup-2x e-sortadjust"> </span>



3 Replies

BS Balaji Sekar Syncfusion Team November 3, 2021 05:13 PM UTC

Hi Shaik Abdul Sameer, 

Greetings from the Syncfusion support. 

Before proceed your query we need confirm that you need to bind the HTML element on Grid column’s header cell or share your exact requirement to us that will help to validate further. 

Regards, 
Balaji Sekar. 



SA Shaik Abdul Sameer replied to Balaji Sekar November 8, 2021 05:35 AM UTC

Hi,




@(Html.EJ().Grid<object>("ProviderDeatilsGrid")

 .Datasource(d => d.CrossDomain(false).URL(Url.Action("GetProviderSearchResults") + "/" + Guid.NewGuid()).Offline(true))

 .Columns(col =>

  {

       col.Field("ProviderName").HeaderText("Provider Name").Template(true).TemplateID("#columnTemplate").Add();

      col.Field("BirthDate").HeaderText("Birth Date").Template(true).TemplateID("#dateColumnTemplate").Add();

     col.Field("ProviderAddress.StateName").HeaderText("Primary Practice State").Add();

     col.Field("RosterStatusName").HeaderText("Roster Status").Add();

     col.Field("ProviderStatusName").HeaderText("Provider Status").Add();

        col.Field("CAQHId").HeaderText("CAQH Provider ID").Add();

   }).AllowPaging().PageSettings(e => e.PageSize(PortalSettings.PageSize)).AllowSorting())


i have a grid structure like above which will be shown as table on the application page,so as per the upgraded one we are getting span tag outside of a div tag as shown earlier,Is there any possible solution to get span tag inside a div tag ? If there how can we apply that on grid structure.



AG Ajith Govarthan Syncfusion Team November 10, 2021 03:52 AM UTC

Hi Shaik, 

Thanks for the update. 

Based on your query, you are getting span tag outside of the div tag element in your Grid application. So, we have checked the same at our end and found that the span tag element is placed inside the div element without any issues. For your convenience we have attached the screenshot, please refer them for your reference. 

Screenshot: 
 

If you still face the issue, then please share the below details to find the root cause of the issue. 

  1. Please let us know that do you want to append new element in the header cell?

  1.  Are you facing the issue for all the header cells?
 
  1. Share the screenshot or video demonstration of the reported issue.
 
  1. Share the Syncfusion package version.
 
Regards, 
Ajith G. 


Loader.
Up arrow icon