There are 3 columns(Count,Item,Price) in datagridview which is bound to a datasource. The count is 1 by default and it should increment by 1 when i click on a button,so the count would be 2 if i click button again. Any suggestions?

Recommended Answers

All 3 Replies

You can have primary key column in database with autoincrement 1 to it. and fecth from db. it would be easy to do and also maintain ur data in DB.

is it possible in datagridview? increment the value in same cell.
eg: if the value of 1st cell is 1 and when i click on button the value of same cell should change to 2.

You need to set that trhough code..
datagridview1.Coloumns(0).cell(0).value="" some thing like this.. this is not the excact syntax...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.