Click here to Skip to main content
16,005,467 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSound?! Pin
md_refay8-Jun-06 6:55
md_refay8-Jun-06 6:55 
AnswerRe: Sound?! [modified] Pin
hmklakmal8-Jun-06 12:19
hmklakmal8-Jun-06 12:19 
QuestionCurrencyManger Pin
md_refay8-Jun-06 6:53
md_refay8-Jun-06 6:53 
QuestionHow do you get .MP3 duration Pin
DaleGraham8-Jun-06 6:08
DaleGraham8-Jun-06 6:08 
AnswerRe: How do you get .MP3 duration Pin
daniel worel11-Jun-06 7:16
daniel worel11-Jun-06 7:16 
Questionprinting in vb.net 1.1 Pin
amaneet8-Jun-06 4:04
amaneet8-Jun-06 4:04 
QuestiondtPicker in VB Pin
.NetRams8-Jun-06 3:06
.NetRams8-Jun-06 3:06 
QuestionDatagrid refreshing problem Pin
Pandian Subramani8-Jun-06 2:51
Pandian Subramani8-Jun-06 2:51 
I am using a datagrid on my Windows form to display records stored in a SQL Server database. When the form loads the datagrid is populated with the records. When I select an item in the datagrid the values are displayed in some text boxes. So when i select a different row in the datagrid the text boxes change accordingly. This part is fine.

I then have two buttons, Add and Delete. I use SQL statements to Add and Delete records. The SQL statements are fine and when I check the table in SQL Server the Addition or Deletion has been successful. The problem is refreshing my datagrid. If i close the form and open it again the datagrid reflects the changes, but i want it to refresh without closing and opening the form. The code for the Add button is as follows:

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim Command As SqlCommand

Command = New SqlCommand("Insert into FitmentReasons(code,description, active) values ('" & txtCode.Text & "','" & txtDescription.Text & "','1')", gConn)
Command.ExecuteNonQuery()

txtCode.Clear()
txtDescription.Clear()

End Sub



AnswerRe: Datagrid refreshing problem Pin
amaneet8-Jun-06 3:06
amaneet8-Jun-06 3:06 
AnswerRe: Datagrid refreshing problem Pin
sathish s8-Jun-06 3:24
sathish s8-Jun-06 3:24 
QuestionMSFLEXGRID Pin
krishnarajathanthri8-Jun-06 2:42
krishnarajathanthri8-Jun-06 2:42 
AnswerRe: MSFLEXGRID Pin
jonathan158-Jun-06 3:12
jonathan158-Jun-06 3:12 
Questionebooks regarding vb.net Pin
Himanshuarora_er8-Jun-06 1:37
Himanshuarora_er8-Jun-06 1:37 
AnswerRe: ebooks regarding vb.net Pin
Kevin McFarlane8-Jun-06 2:19
Kevin McFarlane8-Jun-06 2:19 
Questionhow to convert string to unicode and unicode to string Pin
roitha8-Jun-06 0:09
roitha8-Jun-06 0:09 
AnswerRe: how to convert string to unicode and unicode to string Pin
padma_018-Jun-06 0:42
padma_018-Jun-06 0:42 
AnswerRe: how to convert string to unicode and unicode to string Pin
Mekong River8-Jun-06 23:49
Mekong River8-Jun-06 23:49 
QuestionQuestions about an Addin for Visual Studio Pin
dlarkin777-Jun-06 23:12
dlarkin777-Jun-06 23:12 
QuestionHow to handle null date field from database Pin
Ronny_20067-Jun-06 22:29
Ronny_20067-Jun-06 22:29 
AnswerRe: How to handle null date field from database Pin
jonathan158-Jun-06 1:19
jonathan158-Jun-06 1:19 
QuestionRe: How to handle null date field from database Pin
Ronny_20068-Jun-06 20:47
Ronny_20068-Jun-06 20:47 
AnswerRe: How to handle null date field from database Pin
jonathan158-Jun-06 22:25
jonathan158-Jun-06 22:25 
JokeRe: How to handle null date field from database Pin
Ronny_200614-Jun-06 20:28
Ronny_200614-Jun-06 20:28 
QuestionUnrecoverable build error Pin
jon-807-Jun-06 22:29
professionaljon-807-Jun-06 22:29 
QuestionBrowser Pin
Socheat.Net7-Jun-06 22:05
Socheat.Net7-Jun-06 22:05 

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.