Click here to Skip to main content
15,905,325 members
Home / Discussions / C#
   

C#

 
AnswerRe: textbox input Pin
BillWoodruff3-Mar-18 14:31
professionalBillWoodruff3-Mar-18 14:31 
GeneralRe: textbox input Pin
User 136751143-Mar-18 23:56
User 136751143-Mar-18 23:56 
GeneralRe: textbox input PinPopular
OriginalGriff4-Mar-18 1:21
mveOriginalGriff4-Mar-18 1:21 
GeneralRe: textbox input Pin
BillWoodruff4-Mar-18 2:18
professionalBillWoodruff4-Mar-18 2:18 
GeneralRe: textbox input Pin
Luc Pattyn4-Mar-18 7:19
sitebuilderLuc Pattyn4-Mar-18 7:19 
GeneralRe: textbox input Pin
OriginalGriff4-Mar-18 19:27
mveOriginalGriff4-Mar-18 19:27 
GeneralRe: textbox input Pin
Pete O'Hanlon4-Mar-18 20:56
mvePete O'Hanlon4-Mar-18 20:56 
GeneralRe: textbox input Pin
OriginalGriff4-Mar-18 21:04
mveOriginalGriff4-Mar-18 21:04 
GeneralRe: textbox input Pin
Pete O'Hanlon4-Mar-18 21:10
mvePete O'Hanlon4-Mar-18 21:10 
QuestionHow to create a recursive lambda function ? Pin
Jesus Carroll2-Mar-18 12:26
professionalJesus Carroll2-Mar-18 12:26 
AnswerRe: How to create a recursive lambda function ? PinPopular
Eddy Vluggen2-Mar-18 12:32
professionalEddy Vluggen2-Mar-18 12:32 
PraiseRe: How to create a recursive lambda function ? Pin
Jesus Carroll2-Mar-18 12:48
professionalJesus Carroll2-Mar-18 12:48 
GeneralRe: How to create a recursive lambda function ? Pin
Eddy Vluggen2-Mar-18 13:05
professionalEddy Vluggen2-Mar-18 13:05 
AnswerRe: How to create a recursive lambda function ? Pin
jschell3-Mar-18 11:00
jschell3-Mar-18 11:00 
AnswerRe: How to create a recursive lambda function ? Pin
Richard Deeming5-Mar-18 8:08
mveRichard Deeming5-Mar-18 8:08 
QuestionMove Up And Down rows in datagridview and update it in database Pin
Member 133258462-Mar-18 10:49
Member 133258462-Mar-18 10:49 
AnswerRe: Move Up And Down rows in datagridview and update it in database Pin
Eddy Vluggen2-Mar-18 12:34
professionalEddy Vluggen2-Mar-18 12:34 
GeneralRe: Move Up And Down rows in datagridview and update it in database Pin
Member 133258462-Mar-18 23:53
Member 133258462-Mar-18 23:53 
GeneralRe: Move Up And Down rows in datagridview and update it in database Pin
Eddy Vluggen3-Mar-18 2:34
professionalEddy Vluggen3-Mar-18 2:34 
GeneralRe: Move Up And Down rows in datagridview and update it in database Pin
Member 133258463-Mar-18 18:47
Member 133258463-Mar-18 18:47 
GeneralRe: Move Up And Down rows in datagridview and update it in database Pin
Eddy Vluggen4-Mar-18 1:41
professionalEddy Vluggen4-Mar-18 1:41 
QuestionUse from dataReader to bind data to a data gridview Pin
Member 133258462-Mar-18 10:38
Member 133258462-Mar-18 10:38 
Hi,
i am loading my data with a dataReader but every time i am select another table, the new selected Rows will add below the previous table Rows. how can i empty it and load Only data of the new selected table.
thank you in advance.
here is my code:


OleDBConnectio con=new OleDBConnection(conectionString);
con.Open();
OleDBDataCommand com=new OleDBCammand(“Select *From[“+txtBox1.Text+”]”,con);
OleDBDataReader dr;
dr=com.ExecuteReader();
While(dr.read())
{
Dgv1.Rows.Add(dr[“ID”],dr.[“name”].ToString());
}
dr.Close();
con.Close();

i should mention that i don't want use from data source to bind my database to DGV, because i want to add row in my DGV programmatically.
thanks a lot.
AnswerRe: Use from dataReader to bind data to a data gridview Pin
Eddy Vluggen2-Mar-18 12:35
professionalEddy Vluggen2-Mar-18 12:35 
GeneralRe: Use from dataReader to bind data to a data gridview Pin
Member 133258463-Mar-18 0:06
Member 133258463-Mar-18 0:06 
SuggestionRe: Use from dataReader to bind data to a data gridview Pin
Richard Deeming5-Mar-18 8:02
mveRichard Deeming5-Mar-18 8:02 

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.