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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Rating is displayed in two lines in a data grid

Thread ID:

Created:

Updated:

Platform:

Replies:

143849 Apr 6,2019 07:18 AM UTC May 9,2019 03:35 PM UTC ASP.NET MVC - EJ 2 5
loading
Tags: Grid
John Stephen Mangam
Asked On April 6, 2019 07:18 AM UTC

Hey,

The rating stars are being shown in two lines in spite of giving longer width.

Could you please let me know how I could show all 5 stars in a single line in a data grid?

Thank you.
John

Thavasianand Sankaranarayanan [Syncfusion]
Replied On April 8, 2019 11:03 AM UTC

Hi John, 

Greetings from Syncfusion support. 

Before proceeding to your query please provide the following details. 

  1. Share the screen shot or video demonstration of the issue.
  2. Share the Grid code example.
  3. Do you specify the width for that template column (rating column) ?
  4. Share the Essential Studio version details.
  5. Do you have ej 1 Rating control inside a ej 2 Grid control ?

Regards, 
Thavasianand S. 


John Stephen Mangam
Replied On April 9, 2019 09:56 AM UTC

Dear Thavasianand,

Please find the information that you requested:
  • Share the screen shot or video demonstration of the issue.
Attached a zip file
  • Share the Grid code example.
<e-grid-columns>
        <e-grid-column field="x1" isIdentity="true" isPrimaryKey="true" allowSorting="false" allowFiltering="false" visible="false"></e-grid-column>
        <e-grid-column field="x2" headerText="x2" textAlign="Left" width="200px"></e-grid-column>
        <e-grid-column field="x3" headerText="x3" textAlign="Left" width="160px"></e-grid-column>
        <e-grid-column field="x4" headerText="x4" textAlign="Left" template="#mediaPlayer" width="270px" minWidth="50px"></e-grid-column>
        <e-grid-column field="Rating" headerText="Rating" textAlign="Left" width="200px" template="#UpdateRatingGridRowCommand"></e-grid-column>
        <e-grid-column field="x6" headerText="x" textAlign="Left" width="120px" template="#someGridRowCommand"></e-grid-column>
    </e-grid-columns>
</ejs-grid>

  • Do you specify the width for that template column (rating column) ?
<script id="UpdateRatingGridRowCommand" type="text/x-template">
    <input class="ratingControl" id="${Id}" value="${Rating}" />
</script>
  • Share the Essential Studio version details.
- syncfusion.ej\16.4.0.54
- syncfusion.ej2.aspnet.core\16.4.0.54
  • Do you have ej 1 Rating control inside a ej 2 Grid control ?
Yes, that's true

Attachment: grid_c23f2126.zip

Thavasianand Sankaranarayanan [Syncfusion]
Replied On April 10, 2019 12:29 PM UTC

Hi John, 

We have tried to reproduce the issue at our end, but it is unsuccessful. We have applied the same properties for rating column. But we cannot reproduce the issue. We have attached the sample for your reference. 


If you still faced the issue please share the following details:  
  1. Full Grid code example.
  2. Have you used any other events except queryCellInfo
  3. Reproduce the issue in given sample If possible

Regards, 
Thavasianand S. 


John Stephen Mangam
Replied On May 8, 2019 04:17 PM UTC

Hi,

Here's my code for queryCellInfo:

function CommonGridCellTemplate(args) {
        $(args.cell).find(".ratingControl").ejRating({
            allowReset: false, value: args.data.Rating, change:
                function changedRating(args) {
                ...

Thank you.

Renjith Singh Rajendran [Syncfusion]
Replied On May 9, 2019 03:35 PM UTC

Hi John, 

We have checked in our sample with your shared code snippet. But we are still unable to reproduce the issue at our end. We have attached the sample for your reference. If you still faced the issue please share the following details. 
  1. Reproduce the issue in above sample and revert to us
  2. Please share the snippet of Grid properties you have used in your sample


Please get back to us with the above details, So we colud provide a better solution as soon as possible. 

Regards, 
Renjith Singh Rajendran. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon