Results 1 to 5 of 5
  1. #1
    Senior Member dennis123's Avatar
    Join Date
    Apr 2013
    Location
    Bangalore
    Posts
    3,627

    How to add Serial No. to first column of specific Table only

    I have many tables on dashboard also I have fullCalender(fullCalender uses table on UI) on dashboard. All I need is to have serial number in first column of specific table only, it can be identified by either id or class,

    <style>
    table { counter-reset: Serial; }
    table { border-collapse: separate; }
    tr td:first-child:before { counter-increment: Serial; content: counter(Serial).; }
    </style>
    but it give serial numbers to all the table that exists on UI including fullCalender.

  2. #2
    Registered User
    Join Date
    Feb 2014
    Location
    delhi
    Posts
    572
    I accomplished it using below css code,

    <style>
    .serialTable { counter-reset: Serial; }
    .serialTable { border-collapse: separate; }
    .serialTable tr td:first-child:before { counter-increment: Serial; content: counter(Serial); }
    </style>

  3. #3
    Senior Member
    Join Date
    Nov 2015
    Location
    United Kingdom
    Posts
    241
    you can try this.
    <style>
    table { counter-reset: Serial; }
    table { border-collapse: separate; }
    tr td:first-child:before { counter-increment: Serial; content: counter(Serial).; }
    </style>

  4. #4
    Registered User
    Join Date
    Sep 2017
    Posts
    1,192
    In we compelling reason with embed a table with one section and one hundred rows: Position your cursor the place you have any desire those table. Click those embed tab. Then, decide embed table from those table dropdown in the Tables assembly. In the coming about dialog, enter 1 in the number from claiming Columns field What's more 100 in the number of Rows field.

  5. #5
    Registered User
    Join Date
    Oct 2016
    Posts
    188
    Use this code, hope it will work for you:

    <asp:TemplateField HeaderText="IndexNo.">
    <ItemTemplate>
    <%# Container.DataItemIndex + 1 %>
    </ItemTemplate>
    </asp:TemplateField> in the gridview

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.