Click here to Skip to main content
15,909,530 members
Home / Discussions / C#
   

C#

 
GeneralRe: MarshalDirectiveException Pin
korrea8021-Dec-11 0:48
korrea8021-Dec-11 0:48 
QuestionXML Serialization Pin
rk288120-Dec-11 2:42
rk288120-Dec-11 2:42 
AnswerRe: XML Serialization Pin
Subin Mavunkal20-Dec-11 4:39
Subin Mavunkal20-Dec-11 4:39 
GeneralRe: XML Serialization Pin
rk288120-Dec-11 19:35
rk288120-Dec-11 19:35 
AnswerRe: XML Serialization Pin
Eddy Vluggen20-Dec-11 6:30
professionalEddy Vluggen20-Dec-11 6:30 
AnswerRe: XML Serialization Pin
SledgeHammer0120-Dec-11 6:37
SledgeHammer0120-Dec-11 6:37 
GeneralRe: XML Serialization Pin
rk288120-Dec-11 19:54
rk288120-Dec-11 19:54 
QuestionDatagridView Adds Extra Empty Row Pin
AmbiguousName20-Dec-11 1:07
AmbiguousName20-Dec-11 1:07 
hello guys... i have this datagridview inwhich I add some data using DataTable. Now If I add more than one rows in my grid, it adds two empty rows at the bottom while it should add just one. Here is the code
C#
private void CellDblClick(object sender, DataGridViewCellEventArgs e)
{
    int colPartNum = 1;
    string colPartDetails = "Keyboard";
    int colQty = 5;
    double colPartCost = 15;

    //This is just a DataTable declared at the TOP
    AllItemsDT.Rows.Add(colPartNum, colPartDetails, colQty, colPartCost); 

    AddRowsToGrid(AllItemsDT);
}

private void AddRowsToGrid(DataTable dt)
{
  dgItemDetails.AutoGenerateColumns = false;
  dgItemDetails.Columns[0].DataPropertyName = dt.Columns[0].ColumnName;
  dgItemDetails.Columns[1].DataPropertyName = dt.Columns[1].ColumnName;
  dgItemDetails.Columns[2].DataPropertyName = dt.Columns[2].ColumnName;
  dgItemDetails.DataSource = dt;
  dgItemDetails.Rows[0].Selected = true;
}

So why it is adding two empty rows at the bottom if I add more than one rows, while it should add just one? thnx
AnswerRe: DatagridView Adds Extra Empty Row Pin
PIEBALDconsult20-Dec-11 4:27
mvePIEBALDconsult20-Dec-11 4:27 
Questionapp working in window Xp but not in window 7 Pin
Hum Dum19-Dec-11 22:44
Hum Dum19-Dec-11 22:44 
AnswerRe: app working in window Xp but not in window 7 Pin
OriginalGriff19-Dec-11 23:03
mveOriginalGriff19-Dec-11 23:03 
GeneralRe: app working in window Xp but not in window 7 Pin
Hum Dum19-Dec-11 23:37
Hum Dum19-Dec-11 23:37 
AnswerRe: app working in window Xp but not in window 7 Pin
Luc Pattyn20-Dec-11 7:03
sitebuilderLuc Pattyn20-Dec-11 7:03 
GeneralRe: app working in window Xp but not in window 7 Pin
Hum Dum8-Jan-12 22:43
Hum Dum8-Jan-12 22:43 
AnswerRe: app working in window Xp but not in window 7 Pin
Luc Pattyn9-Jan-12 5:17
sitebuilderLuc Pattyn9-Jan-12 5:17 
GeneralRe: app working in window Xp but not in window 7 Pin
Hum Dum9-Jan-12 18:50
Hum Dum9-Jan-12 18:50 
QuestionData Source problem Pin
David baghaturia19-Dec-11 20:13
David baghaturia19-Dec-11 20:13 
AnswerRe: Data Source problem Pin
Jitendra Parida - Jeetu20-Dec-11 1:56
Jitendra Parida - Jeetu20-Dec-11 1:56 
GeneralRe: Data Source problem Pin
David baghaturia20-Dec-11 5:57
David baghaturia20-Dec-11 5:57 
AnswerRe: Data Source problem Pin
AmitGajjar25-Dec-11 22:00
professionalAmitGajjar25-Dec-11 22:00 
GeneralRe: Data Source problem Pin
David baghaturia25-Dec-11 22:46
David baghaturia25-Dec-11 22:46 
QuestionHow to create .chm file that is help file Pin
sarang_k19-Dec-11 17:08
sarang_k19-Dec-11 17:08 
AnswerRe: How to create .chm file that is help file Pin
JF201519-Dec-11 21:17
JF201519-Dec-11 21:17 
AnswerRe: How to create .chm file that is help file Pin
Prasanna Kumar Pete22-Dec-11 0:59
Prasanna Kumar Pete22-Dec-11 0:59 
QuestionAny way to add USER settings at runtime? Pin
SledgeHammer0119-Dec-11 9:59
SledgeHammer0119-Dec-11 9:59 

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.