This question was already answered a few hours ago. My answer isn't going to change. You absolutely NEED to validate the data in the textboxs and convert it to the appropriate types expected by your fields.
Like was said before, you're trying to assign a string to a numeric field, hence the error you're getting. Convert the string in the TextBox to a valid number BEFORE you assign it to your field.
i am using .net 2003.i am doing my project in vb.net windows application to add and update person details like company name,contactperson,emailid,phoneno,etc..i want to edit a selected row in sql database through datagrid during runtime.plz help me.
The simplest version of this would just get the data you want to edit into a DataTable or DataSet object, bind the DataGrid to this DataTable, and let the user edit the data in the grid directly. When they're done, you can supply a button to save the information back to the database.
Getting the data is normally done using a DataAdapter to query the database and fill a DataTable or DataSet. When the user is done, call the Update method on the DataAdpater to write the changes back to the database.
try this one... its not for DataGrid.. this one works for MSFLEXGRID
Private Sub Form_Load()
Text1.Visible = False
Private Sub MSFlexGrid1_Click()
If MSFlexGrid1.Col = 0 Then
Text1.Visible = True
Text1.Left = .Left + .CellLeft
Text1.Height = .CellHeight
Text1.Width = .ColWidth(0)
Text1.Top = .Top + .CellTop
Text1.Visible = False
Private Sub Text1_Change()
.TextMatrix(.Row, 0) = Text1.Text
The code is for editing the frst column of the grid...
This is normally done through the approparite use of container controls, like the TableLayoutPanel, SplitContainer, and various others. Combine these with appropriate use of the Anchor and Dock properties on your controls to get the scaling and sizing effects you want.
It just takes some playing about with the controls properties to get the effects you want. There really isn't a single good source for this information, and even fewer examples. The stuff I've seen just explains the control properties Anchor and Dock and that's about it.
I want to develop an level output meter like an 8 band equalizer. I saw some implementations to show a waveform, but this is not what I want. In the end the control should work like the winamp level meter. Has anybody an idea how to start?
I'will try to make it more clear. I developed a little tool for organizing and playing mp3 albums and files. To play the files I'm currently using the media player control. All that I want is to visualize the currently played mp3 in an 8-band level meter.
It's called a "spectrum analyzer". This is actually going to be quite difficult to do. You can only use the data that is currently going through the audio mixer to feed the analyzer. Reading the MP3 file directly will do you no good because you can't tell where the current sound is in the file.
You can find an example of this here[^], but I'll warn you, it's not for the beginner.
You can also find more about them on Google, here[^] or even find libraries that can do this for you.
What do you want to do ? Showing them is fairly easy, if you embed IE in your app, it will do it. Creating them requires a third party library.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Go through your toolbox there is a validation control
section, in that u get a date validation control, use that control...OR if you don't know how to use the control then just go through the MSDN and take help abt the validation control.
Be A Good S/W Eng... Life is swing with you..Enjoy..