By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

How to generate serial number in datagrid view by automatically?

swarnalaxmi
P: 6
to display serial number for rows in gridview
Oct 2 '09 #1
Share this Question
Share on Google+
3 Replies


GaryTexmo
Expert 100+
P: 1,501
What do you mean by serial number? Can you please post a little more information or an example of what you're thinking?

Thanks!
Oct 2 '09 #2

swarnalaxmi
P: 6
serial number is row number....
I want to display the datagridview like
S.No Price Quantity Total
1 10 2 20
2 20 3 60
3 40 5 200

i can get the price quantity and total from database.
serial number should automaticlly generate based on number if row values.....

i need like this.....
can you help me?
Oct 3 '09 #3

100+
P: 270
Add new template field in the datagrid,

inside the template field add a label..

in the rowdatabound event of datgrid set the label text to the serial number.
Oct 3 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.