I have an app that lets the user reorder columns in a DataGridView, and I want to save the "layout" upon closing the app...but it seems that when I iterate through the column collection, I get them in the order I added them, not the order they appear on screen. Is there a way to get the displayed ordering?
edit: found it, just check the...
I have an unbound DataGridView (in VS 2008), of which one column contains a file path. I'd like to format the string using the TextRenderer class on the ColumnWidthChanged event without actually modifying the underlying value. The problem is that the contents of the table are saved when the form is closed and I don't want to save the for...
Hi!
I'm using WinForms and a DataGridView.
I've register an CellClick event for selecting/unselecting 1 item (project name).
The problem is that with CTRL button hold down + Mouseclick
this Event is not fired.
This is my EventHandler:
private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
...
I have a DataGridView set up with the following columns:
Teacher, Subject, Date, Period.
After a lot of Googleing I can see there are a few ways to add data to the grid programmatically, with each one differing to another quite extensively.
I wanted your opinion on how I should go about this, considering I am going to be adding data f...
Hi
I've DataGridView that bound a List<myClass> and i sort it by "Priority" property in "myClass".
So I want to drag an "DataGridViewRow" to certain position to change it's "Priority" property.
How could I "Drag & Drop" DataGridView Rows ?.
And how to handle this ?.
...
Hi,
I have created one application in c#.net.Using this application we can update datagridview,now i need to implement undo in it plz give me some ideas.
private void button29_Click(object sender, EventArgs e)
{
Datatable dt;
dt.RejectChanges();
}
using above code i can do undo before updating.
but i...
I'm looking for an event that occurs right right after loading and after sorting.
I have a piece of code that colors some of the Rows in a DataGridView control. But when I sort the style changes are lost. I need the right event to tap into to redo the coloration step after the load/sort events. Trying to right clean code ... so I was lo...
Does anyone know of a way to disable a checkbox in a DataGridView using a DataGridViewCheckboxCell?
I can make it read only, and set the background color, but I can’t get the checkbox itself to appear disabled. Any thoughts?
...
I have encountered a rather nasty problem with the DataGridView control (Windows.Forms, .NET Framework 3.0) when there is a DataGridViewCell that is larger than the DataGridView itself. When the large cell is scrolled into view it displays normally, cut off at the bottom since it is larger than the view. If you scroll down further it eve...
I have a Winforms app that has a DataGridView that is databound at runtime.
One of the columns contains mostly just text but some of it's cells are populated with url's that I would like to make clickable.
How can I can I tell the DataGridView that if the value in the cell looks like a valid url ie. begins with "http" or something simi...
Hi !
I'm painting my rows in a DataGridView like this:
private void AdjustColors()
{
foreach (DataGridViewRow row in aufgabenDataGridView.Rows)
{
AufgabeStatus status = (AufgabeStatus)Enum.Parse(typeof(AufgabeStatus), (string)row.Cells["StatusColumn"].Value);
switch (status)
...
I am having trouble with a DataGridView.
I have a collection of 3 Items bound to the grid, when trying to delete one of the items and reload the grid.
If have code of
If (dlg.ShowDialog() = DialogResult.OK) Then
'Show dialog with grid on it
End If
On the opened dialog, I delete an item from the grid (which should in turn, delete...
I have a DataGridView in a C# WinForms app that is DataBound at runtime (through Form_Load) to a custom Object.
In the design view of the DataGridView I have no columns set up.
When the Form loads the the columns are automatically created based on the data in the Custom object that it is DataBound to.
My question is how can I control the...
I'm using c#2.0 and WinForms.
I have a datagridview control, unbound, loading small amounts of data which include a "Status" relating to a customer.
Now statuses are set up by the user and assigned a sequence number. I would like to display the name of the status in a column on the grid (straight forward enough) but have the customer d...
I have a column which is of integer.
when i edit this cell,i need to enter only numbers but not characters.
Am not using datagridviewTextboxColumn.It is a cell.
It should not allow typing characters just like a textbox_keyPress event where we give Char.IsDigit to restrict characters.
How do i do this in C# ?
Thank you
...
I have a DataTable as a data source of a GridView. I'm adding a combo box the the GridView .
I'd like to be able to add a column to the DataTable that would automatically update with the value the user selects in the GridView. Can anyone help?
...
This is for a winform vb.net 2008 app. I'm bringing data back from a database and based on some static conditions... i want to change the color of the background and the text. There is no rowdatabound event in winform...
hope someone can provide some guidance
thanks
shannon
...
when I do :
DataGridViewRow.Rows[index].Selected = true;
it however selects the row but the cursor(focus) is still pointing to the previous row..
When I manually enter in edit mode .. it highlights the cell of previous row..not on the row which done through coding..
However when I select the row through mouse then the cursor (focus) a...
Hi,
Im having a dataGridview , in which im showing folder path in one of row cell.
and i made it scrollable text. if some error in path, it shows ErrorText with errortexticon.
Here when i click on text, errorText gets dissapears.
Can anyone help me out to retain that errorTextIcon in the cell.
Would there any way to make that errorT...
This is only occurring on a user's machine, not mine. I cannot recreate this issue. Since this is occurring inside the DataGridView's internal code, I'm not quite sure how to proceed. Any ideas?
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the...