it means if user insert "n"(number of case) in textbox than click the "Next" button, in datagridview set to "n" number of rows. i don't know what code i use, please help me,
please check attach file, thank you so much
Khaliunaa 0 Newbie Poster
Recommended Answers
Jump to PostI would set datagrid's property
AllowUserToAddRow
to False and then manage to add a row by code. For example:Private Sub btnNext_Click(sender As System.Object, e As System.EventArgs) Handles btnNext.Click Try Dim caseNum As Int32 = 0 If Int32.TryParse(tbCase.Text, caseNum) Then With DataGridView1 Dim index As …
Jump to PostIt is always handy for us if you would tell us what the error message was you got.
EDIT:
Just guessing:
Line 11 you could trycaseNum.ToString();
Jump to PostOh, I see.
Well atry
statement always has to be followed by at least acatch
statement. See here for some explanation.
In your code I'd leave thetry
out. YourTryparse
…
All 9 Replies
xrjf 230 Posting Whiz
Khaliunaa 0 Newbie Poster
xrjf 230 Posting Whiz
Khaliunaa 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
Khaliunaa 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
xrjf 230 Posting Whiz
Khaliunaa 0 Newbie Poster
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.