Click here to Skip to main content
15,911,711 members
Home / Discussions / C#
   

C#

 
GeneralRe: Transfer parameter in main method Pin
Expert Coming30-Jun-08 23:06
Expert Coming30-Jun-08 23:06 
GeneralRe: Transfer parameter in main method Pin
jason_mf30-Jun-08 23:15
jason_mf30-Jun-08 23:15 
Questiondecimal format in xml serialization Pin
JoZ CaVaLLo30-Jun-08 22:08
JoZ CaVaLLo30-Jun-08 22:08 
QuestionChange windows Time & Date Pin
Mahdi 8216102130-Jun-08 21:59
Mahdi 8216102130-Jun-08 21:59 
AnswerRe: Change windows Time & Date Pin
Simon P Stevens30-Jun-08 22:34
Simon P Stevens30-Jun-08 22:34 
AnswerRe: Change windows Time & Date Pin
PIEBALDconsult1-Jul-08 4:56
mvePIEBALDconsult1-Jul-08 4:56 
Questionbinding data from sql tables to treeview control c#.net? Pin
Ashish Kumar Vyas30-Jun-08 21:57
Ashish Kumar Vyas30-Jun-08 21:57 
QuestionAdding rows to DataGridView programmatically Pin
Desmond Lim30-Jun-08 21:51
Desmond Lim30-Jun-08 21:51 
Hi,

Project
-------
I have this list box that will get a list of items from a database. Upon choosing an item, it will populate the DataGridView with the data, this data is different for different items, e.g. one might have a size field and another wouldn't or an item might have 5 entries but another 9, etc. This populated data is from a table that has a unique ID (key), the field name, the field value and the foreign key to link to the item table.

Problem 1
---------
Currently, I'm trying to add an item into the database, how can I create a DataGridView that would allow me to add rows to it. If I bind it to a table I get the error that table.rows.add() is not allowed on a bound DataGridView.

I have to presume that I can just unbind the table and add the rows of data manually. I'm wondering if there is an easier way of doing it.

Problem 2
---------
Further to the above, if I want to edit an item, how can I go about adding a new row if the columns are bound. I require (during editing) that columns because more than 1 user might be editing the same item at the same time.

How would I go about doing this?

Anyone has any article to point me to?

Thanks.

Desmond
AnswerRe: Adding rows to DataGridView programmatically Pin
lnkgoeng2-Jul-08 0:55
lnkgoeng2-Jul-08 0:55 
QuestionProblem with printing a page foreach listview.items Pin
andredani30-Jun-08 21:48
andredani30-Jun-08 21:48 
AnswerRe: Problem with printing a page foreach listview.items Pin
Christian Graus30-Jun-08 21:58
protectorChristian Graus30-Jun-08 21:58 
GeneralRe: Problem with printing a page foreach listview.items Pin
andredani30-Jun-08 23:07
andredani30-Jun-08 23:07 
Questionabout c#.net Pin
rupmax30-Jun-08 21:39
rupmax30-Jun-08 21:39 
AnswerRe: about c#.net Pin
Christian Graus30-Jun-08 21:55
protectorChristian Graus30-Jun-08 21:55 
QuestionLINQ Pin
arkiboys30-Jun-08 21:23
arkiboys30-Jun-08 21:23 
AnswerRe: LINQ Pin
Christian Graus30-Jun-08 21:57
protectorChristian Graus30-Jun-08 21:57 
AnswerRe: LINQ Pin
Scott Dorman30-Jun-08 22:57
professionalScott Dorman30-Jun-08 22:57 
Questionsimple test Pin
blackjack215030-Jun-08 21:02
blackjack215030-Jun-08 21:02 
AnswerRe: simple test Pin
Christian Graus30-Jun-08 21:56
protectorChristian Graus30-Jun-08 21:56 
AnswerRe: simple test Pin
Scott Dorman30-Jun-08 23:00
professionalScott Dorman30-Jun-08 23:00 
QuestionPropertyGrid Pin
KBou30-Jun-08 20:53
KBou30-Jun-08 20:53 
AnswerRe: PropertyGrid Pin
leppie30-Jun-08 20:55
leppie30-Jun-08 20:55 
QuestionRe: PropertyGrid [modified] Pin
KBou30-Jun-08 21:05
KBou30-Jun-08 21:05 
AnswerRe: PropertyGrid Pin
stancrm30-Jun-08 22:39
stancrm30-Jun-08 22:39 
QuestionRe: PropertyGrid Pin
KBou30-Jun-08 22:49
KBou30-Jun-08 22:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.