question

Hum avatar image
Hum asked

SQL Server Table Live Update using a Data Grid View

How can I bind a SQL Server table with a C# dataGridView so I can update the table within the grid without the need to hit any buttons.
sqlupdatetablerealtime
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pavel Pawlowski avatar image Pavel Pawlowski commented ·
I think, that this kind of question you should ask on a forum related to C# and GUI development in .NET (you will probably receive the answer earlier), as this side is related SQL engine itself. Probably somebody will help you with this, but mostly here are people which are focusing on the SQL Server engine itself an not on GUI development in C#
0 Likes 0 ·
Fatherjack avatar image
Fatherjack answered
Not sure what you mean by "... without the need to hit any buttons." You need to take some sort of action at the UI for the data to be saved unless you have the application do some sort of auto-save every few minutes. This question is similar to yours and may have some information that you can apply http://stackoverflow.com/questions/520051/c-issue-how-do-i-save-changes-made-in-a-datagridview-back-to-the-datatable-used. If you want to use the 'auto' style save then you simply need a routine in your code that does the same save process as your button_onclick method and you are good to go. I am not a developer so this is all theory and you will have to locate proper coding procedures and methods to make sure you follow best practise.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

xiaoyuandlg avatar image
xiaoyuandlg Suspended answered
I suggest that something like the [C# gridview guide][1] be helpful here. [1]: http://www.kettic.com/winforms_ui/csharp_guide/gridview_get_started.shtml
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.