Datagridview sorted and then updating wrong row programatically
I have a data grid view in VB, visual studio 12. When a user clicks on a line in my application I mark the row so I process it later (need this for multi-user). The grid loads from a table but it is...
View ArticleRow count issue using VB.NET dataAdapter
I have created codes for connection to SQL Server and I am able to count rows of the datatable as following.           Dim con As New SqlConnection           Dim cmd1 As New SqlCommand           Dim...
View ArticleDatabind two or more entities to a single DataSource (EF6)
Hello mates!Well, I'm trying to databind my model to the dataGridView's datasource, but I have a problem, a little-big one.for this example, let's use this model:public class Orders { public int...
View ArticleTextbox value to database and stored procedure (c# windows form)
Hello,A little background I'm trying to learn business logic and datalogic and program readability.I am trying to send values of textboxes to Database using stored proceduresI have a class (Datalogic)...
View ArticleGridview filter syntax - C#
I have a gridview ( loads fine with data from the DS ) - using Windows Form... I'm trying to filter the gridview.. So if I use: filtertext = "DeptID = '038'" bindingsource.Filter = filterText; I get...
View ArticleTreeListView in C#
Hi,I am looking for a simple tree list view in C#. On the left-most column it is a tree view, but to its right it displays multiple columns for each tree item.I have used WinControls.ListView, but it...
View ArticleSystem.FormatException: DataGridViewComboBoxCell value is not valid
I've read many other pages on this error, but none have helped me.I'm getting the following exception when using a DataGridViewComboBoxColumn:System.FormatException: DataGridViewComboBoxCell value is...
View ArticleI need a suggestion about DataGridView and DataTable
I need a suggestion that might give me a proper idea. I have two tables in MS SQL 2008 Express. When my project open a WinForm that retrieve the data from DB as binding that to a DGW. So far so good...
View ArticleDataGridView.CurrentCellChanged event has incorrect CurrentCell
Hi,I have a DataGridView with an underlying DataTable as the data source.  Under certain circumstances, the DataGridView.CurrentCell is getting inexplicably changed.If I edit the content of a cell,...
View ArticleHow to set NullValue to (Null) globally (in DataSet designer of VS2013)?
in dataset designer in VS2013, NullValue of all data columns are set to "Throw exception" by default.I want it to be "(Null)" by default. Â Then without changing the xsd file, or configuring every...
View ArticleHow do I get a Databound combobox selected value
I have a DataGridView where one column is a databound ComboBox connected to two columns of a database, display text and value. If I change the value of the dropdown, I can get the value in...
View ArticleNested DataGridVIew Class Implementation
Hi All,I got the code from this original post: http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0a63a483-5b15-40d6-afb4-8add6b4f244f,and i had translated into c# myself:using...
View ArticleDatagridview checkbox.checked event
I have a checkbox column and a amount column in my datagridview.Now when i check one of the checkboxes i want to display the total of that row.How can one capture that checked event.
View ArticleAdding buttons in relation to a specific row
I've trying to add two button to the rows that have value 2, but these button appear only in relation to the dataGridView. If I don't give them a specific location they will appear at the top of the...
View ArticleHow to search the datagridview based on values selected in combo box, just...
I have form partition into master and detail panels. Master panel has 4 combo box and they are getting the values from the same data source as datagridview. I have two questions on this:1. If i select...
View ArticleConvert DATGRID to DataTable in C# WPF
I need to Convert DataGrid data to DataTablehere is my CodeDatatable dt=new DataTable()dt=datagrid.ItemsSource as DataTableMessageBox.Show(dt.Rows.Count.ToString());I am getting ExceptionCan anyone...
View ArticleShow Animated Gif in DataGridView
Hi,I bet there must be an elegant solution for this, I have seen codes trying to draw the gif over the datagridview cell of course the result is disastrous.Although it's no very clear for me, creating...
View ArticleProblem with position of the textboxes and height on datagridview c#
Hi guys, I want to ask a question. Currently, there is no problem with my program once I tested it on 1366 x 768 resolution. But, once I tested it on 1920 x 1080 resolution, position one of the...
View ArticleWhat caused my DGW's paint event
Below event works fine if its tried to use in a simply implemented DGW, but another event's line of code or method causes its task failure. Here is the DGW paint event. if things goes well then DGW...
View ArticleList, sorting column and datagridview
I am very new to Visual Studio, and I am working on my first programming assignment. I am having trouble sorting using List<T> and datagridview. I am not receiving any errors, so I am not sure...
View Article