C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




how to generate serial number


Posted Date: 16 Oct 2008      Total Responses: 2

Posted By: samatha g       Member Level: Gold     Points: 1


iam using datagridview in windows application.
in datagridview,i need to enter data at runtime.the look was like below:

S.No Price Quantity
1
2
3

my doubt was how to generate SERIAL NUMBER automatically at runtime.
and when the data is entering in 1st row next row was creating,shal i restrict that row to create when i press tab from 1st row then only it should create.

please anybody help me soon.its very urgent for me.....




Responses

Author: Meetu Choudhary    16 Oct 2008Member Level: GoldRating:     Points: 2
to generate serial number automatically

write the code on the event of your choice

where you get the cell of the grid and the row number

in the cell write the row number and you will get the sr. no.

==
Thanks and Regards
Meetu Choudhary



Author: Nagarajan    16 Oct 2008Member Level: GoldRating:     Points: 3
DataGrid's RowCreated event is raised when a row is created i nthe datagrid.

So, In the RowCreated event of the datagrid

e.Row.Cells[0].Text = dataGrid.Rows.Count;

Hope this helps
Happy Coder



Post Reply
You must Sign In to post a response.
Next : Reading data from any excel version using c# windows application
Previous : richtextbox
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it help desk

Contact Us    Privacy Policy    Terms Of Use