This probably isn't the best way to do what I want, but I can't think of anything else to try...
NB: I'm using Visual Basic.NET
My form has 2 DataGridView controls. One of these is bound to a DataSet, the other isn't visible - at least not until the user selects a uniqueidentifier cell in the 1st grid.
When the user makes this selecti...
Hi all,
Below is the code to insert value into mysql database, using datagridview.
But the selectcommand is working.It is not happening since i get error stating "Column 'username' cannot be null ".
This error does not pop up if i use ms access database.
Can anyone help me on this. is there any other method to do so.
private void b...
Hi,
Regarding my use of a DataGridView with BindingList, I was to disable editing current rows, but allow adding new rows. The issue I have is that when I disallows edits, this seems to prevent one from adding a new row item, as when you table into the cell for this new row it does not seem to allow editing???
Know how to get around t...
Hi,
I've implemented a custom lookup column, but I'm encountering the damnedest thing with the VS designer. The column has four string properties in addition to the standard column props. Now, if I select the column from the component list in the property grid, then set the properties, everything seems to work fine. However, the moment ...
I tried this (http://brainof-dave.blogspot.com/2007/08/turning-off-auto-scrolling-in-bound.html) in the "RowChanged" event on the DataTable that is the data source for the DataGridView, but to no avail.
Basically, I have a DataGridView with a BindingSource as it's DataSource. The BindingSource's DataSource is a DataView that contains a...
I'm writing a class for logging events. My LogClass is implemented as a singleton, and any class in the system can write a log entry. The entries are stored in a List and when a buffer is filled they get dumped to the disk.
I'm using a DataGridView to display the contents of the LogClass during execution, therefore I used the BindingLis...
I need to be able to copy a name or names from one application (using the normal copy commands) and then be able to double click the text cell in a DataGridView to paste the data into the grid cell. Any ideas on how to accomplish this? I am attempting to minimize keyboard use for this functionality.
...
I've got a datagrid control bound to BindingList of objects. One of the Properties of the object class is boolean. I have customized that column in the datagridview to be a checkbox type.
Things work correctly when the datagridview loads for the rows that have values brought in from the binding list. However, when the "new entry" lin...
I am attempting to populate a DataGridView cell with an image. The image is a 32bit png with Alpha Transparency.
I can get this image to display properly in a picturebox or a Listview but in the DataGridView the image loses quality.
I have tried setting various parts of the control to transparent but nothing seems to work. I import the...
Is possible to edit properties of business object (one property, one column) binded as BindingList to Winforms DataGridView?
Or do I have to use DataSet or DataTable?
I'm not able to get a cell to edit mode.
...
I have a C# Windows application that uses a DataGridView with three columns. The first is a textbox that requires no validation. The second and third columns are both checkboxes. I need help with determining if the boxes are checked or not. If they are then I would like to set the background color of the checkbox cell to red. I am using ...
The easiest way I see to explain what I need is via example.
Suppose I have a DataGridView with 20 rows of data. The DGV is sized to show 10 rows at a time. It is scrolled to show rows 4-13. Row 7 is selected. What I need is a way to get that Row7 is the 4th displayed row.
...
I have a DataGridView being regularly populated via data-bound objects, and the number of rows can potentially become large, say many thousands during a 'logging cycle'.
When a new 'logging cycle' begins, the grid is cleared because the underlying datasource is cleared and the process begins again.
This is all fine, but because the pre...
This is a similar question to How to bind a custom Enum description to a DataGrid, but in my case I have multiple properties.
public enum ExpectationResult
{
[Description("-")]
NoExpectation,
[Description("Passed")]
Pass,
[Description("FAILED")]
Fail
}
public class TestResult
{
public string TestDescriptio...
I have a BindingList<> of objects, set to the DataSource of a BindingSource.
This is set to the DataSource of a DataGridView.
I'm concerned with not causing any potential memory leaks, so wondering if there is a preferred way to unbind these connections when I am finished with the data.
I'm thinking of:
datagridview.DataSource = null;...
I have a DataGridView in virtual mode.
I only implemented the CellValueNeeded eventhandler as described in http://msdn.microsoft.com/en-us/library/15a31akc.aspx.
Implementing the rest of the events only seems needed when you want to be able to edit the cells manually.
I would like to programatically edit a DataGridView cell value.
I ...
Hello everyone.
I need to bind hierarchical List object to a Gridview (Hierarchical in windows form). How can this be achieved - any examples ??
Ex: of list object
List of CargoMovement => Cargomovents
and each CargoMovement has List of Transactions
thanks for help
...
Hi,
I've DGV with my custom List<myClass> as DataSource.
I want the "DataGridViewTextBoxColumn" that in this DataGridView to support Multiline property.
Could you help me with this please ?.
Thank you very much.
...
Hi all:
I have little experience in C#.NET, and below is what I got so far:
I created a DataGridView which bound to an ObjectDataSource(a generic list, that is).
Although I can make good use of the DataGridView's CellClick event and its corresponding delegate interface(DataGridViewCellEventHandler) to do my business logic well, I am s...
Hello,
In my code I need to remove rows from the DataGridView after a recurring interval, and so I call the following function when a timer expires:
private void removeRows(DataGridView dgv) {
foreach (DataGridViewRow row in dgv.Rows)
{
// if some condition holds
dgv.Remove(row);
}
dgv.R...