Click here to Skip to main content
16,010,553 members
Home / Discussions / C#
   

C#

 
GeneralRe: Get an object value using a string Pin
Patrick Etc.10-Oct-07 10:19
Patrick Etc.10-Oct-07 10:19 
AnswerRe: Get an object value using a string Pin
Kasdoffe10-Oct-07 9:08
Kasdoffe10-Oct-07 9:08 
QuestionHow to display image in DataList ? Pin
whale8410-Oct-07 6:32
whale8410-Oct-07 6:32 
QuestionHow to create a Link in a Worksheet using C# Pin
mkarthekeyan10-Oct-07 5:25
mkarthekeyan10-Oct-07 5:25 
AnswerRe: How to create a Link in a Worksheet using C# Pin
led mike10-Oct-07 6:08
led mike10-Oct-07 6:08 
AnswerRe: How to create a Link in a Worksheet using C# Pin
TJoe10-Oct-07 6:40
TJoe10-Oct-07 6:40 
GeneralRe: How to create a Link in a Worksheet using C# Pin
mkarthekeyan14-Oct-07 18:55
mkarthekeyan14-Oct-07 18:55 
QuestionAdding new rows to DataGridView UI in DataBound Mode Pin
Subrahmanyam K10-Oct-07 5:11
Subrahmanyam K10-Oct-07 5:11 
Hi Friends,


I have a requirement to add new rows to the DataGridView UI which is bound to a DataTable.

The new row added to the UI should get added to the underlying DataSource.

I have bound the DataGridView to a DataSource.

The DataSource consists of 10 columns out of which only 5 columns were bound to the DataGridView.

The other 5 columns which are not bound consists of composite primary key on 2 columns and 3 other columns will not accept null values.



I have tried with "DefaultValueNeede" event of the DataGridView to define the default values for the new row.

As only 5 columns are bound to the DataGridView, I could supply the default values only to those columns.

How would I supply the default values to the rest of the columns which are not bound to the DataGridView?

Which event of the DataGridView should be handled in this scenario?

An exception is thrown when I tried to commit the new row in the DataGridView UI (by adding a "new new row") to the DataGrid.

The exception is that "Required values are not supplied to the new DataRow" which are the composite primary key columns (2) and not null columns (3).


Thanks.



Subrahmanyam K

AnswerRe: Adding new rows to DataGridView UI in DataBound Mode Pin
led mike10-Oct-07 5:27
led mike10-Oct-07 5:27 
Questionturn off timer Pin
nhathoang10-Oct-07 4:48
nhathoang10-Oct-07 4:48 
AnswerRe: turn off timer Pin
Justin Perez10-Oct-07 5:09
Justin Perez10-Oct-07 5:09 
GeneralRe: turn off timer Pin
Anthony Mushrow10-Oct-07 8:26
professionalAnthony Mushrow10-Oct-07 8:26 
QuestionAccess Set() method inside UserControl Pin
66chawger10-Oct-07 4:43
66chawger10-Oct-07 4:43 
AnswerRe: Access Set() method inside UserControl Pin
Christian Graus10-Oct-07 9:16
protectorChristian Graus10-Oct-07 9:16 
Questionsaving and retrieving images from sql server 2005 Pin
NewToAspDotNet10-Oct-07 4:42
NewToAspDotNet10-Oct-07 4:42 
AnswerRe: saving and retrieving images from sql server 2005 Pin
led mike10-Oct-07 5:31
led mike10-Oct-07 5:31 
GeneralRe: saving and retrieving images from sql server 2005 Pin
NewToAspDotNet10-Oct-07 5:54
NewToAspDotNet10-Oct-07 5:54 
GeneralRe: saving and retrieving images from sql server 2005 Pin
led mike10-Oct-07 6:05
led mike10-Oct-07 6:05 
GeneralRe: saving and retrieving images from sql server 2005 Pin
NewToAspDotNet10-Oct-07 6:18
NewToAspDotNet10-Oct-07 6:18 
GeneralRe: saving and retrieving images from sql server 2005 Pin
led mike10-Oct-07 6:56
led mike10-Oct-07 6:56 
AnswerRe: saving and retrieving images from sql server 2005 Pin
Giorgi Dalakishvili10-Oct-07 6:49
mentorGiorgi Dalakishvili10-Oct-07 6:49 
QuestionHow come none of the TabControl Articles show events for simple commands for controls in those tabs? [modified] Pin
Ajm11310-Oct-07 4:34
Ajm11310-Oct-07 4:34 
QuestionSerializing a class that contains a TimeSpan memeber Pin
Lucian.Palcu10-Oct-07 4:26
Lucian.Palcu10-Oct-07 4:26 
AnswerRe: Serializing a class that contains a TimeSpan memeber Pin
TJoe10-Oct-07 4:30
TJoe10-Oct-07 4:30 
GeneralRe: Serializing a class that contains a TimeSpan memeber Pin
Lucian.Palcu10-Oct-07 4:49
Lucian.Palcu10-Oct-07 4: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.