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

I want serial number in grid view


Thanks for your previous reply.

 Technology Angular js and mvc

I want to display Sr.No in gridview.

 1 column name  Sr.No
 2 column like student Name 





1 Reply

SP Sunil Prabakar C Syncfusion Team September 18, 2015 12:07 PM UTC

Hi Bharat,

Thanks for contacting Syncfusion support. Since we used dot for complex dataSource, it cannot be used (.) in field name. Hence if we use dot in field name, it will consider as a complex property. So, please remove dot from Sr. No field name and bind it to the Grid using field API of column property. You are able to use any other special characters or using full name instead of using dot in field name.  Please refer to the below code example and sample for more information on field API
 

  <div id="grid" ej-grid e-datasource="data" e-allowkeyboardnavigation='true'  e-pagesettings-pagesize="6" e-pagesettings-currentpage="1" e-pagesettings-pagecount="6" e-allowpaging="true">

        <div e-columns>

            <div e-column e-headertext="SrNo" e-field="Sr.No" e-isprimarykey=" true" e-textalign="right"></div>

            <div e-column e-field="StudentName" e-textalign="right"></div>

        </div>
    </div>

.
Sample link: https://jsplayground.syncfusion.com/2xerq5p3


If we misunderstood your requirement, please provide more details.

Regards,
Sunil Prabakar C

Loader.
Live Chat Icon For mobile
Up arrow icon