When handing the DataGridView.Scroll event, you can check whether it was the end of the scroll (when dragging the scroll bar with the mouse, this is presumably when the mouse button is released).
The problem is that this never seems to happen. e.Type is never ScrollEventType.EndScroll
What's wrong with this? How can I do something only...
I have a Windows Forms application with a DataGridView in one of the forms. The DataGridView can insert and update through a Typed Data Set generated by Visual Studio.
I want to show user friendly error messages when a user doesnt fill in a required field or enters the wrong data type, etc. instead of the ugly huge one that is shown by ...
I am creating my DataGridViewEx class, inherited from DataGridView.
I want to create a method for selecting first cell in a current row, so I wrote this:
/// <summary>
/// The method selects first visible cell in a current row.
/// If current row is null, nothing is done.
/// If any cells are selected, they are unselected befor...
Hello, does anyone know how easy it is or how possible it is to skin a .net Windows Forms DataGridView control? I'd like to render the control vastly different then what it currently looks like.
For example, think of the open source application Boxee. It has a completely custom interface which is how far I'd like to push the control...
We're creating a timesheets application.
We're using a bound DataGridView to display the Task, StartTime and EndTime columns. The StartTime and EndTime are saved as datetimes in the bound SQL table.
The StartTime and EndTime have their CellTemplate defined as follows, so that they only show the Time part:
colStartTime.CellTemp...
How can I hook in the ErrorProvider with individual cells on the DataGridView control?
...
I have an application with a DataGridView on it and I would like to position the rows such that a specific row is at the top of the list.
I don't want a sort, I want a way to programmatically tell the DataGridView "scroll to the Nth row."
Any ideas?
...
Hello,
What is the maximum amount of data I can load onto a form control?
My application consumes too much memory and hangs when more than 500,000 records are added to any windows forms control in my experience. Any clues?
Thanks
...
Hello,
I was requested by a customer to build a grid that represents an ability matrix for actions.
For example, each row represents a protocol, and each column represents an action that can be done on it.
The grid should not be hard-coded - it should load the relevant actions for the protocols. Meaning, there could be a different amount...
Hi,
I'm trying to select the first row where the cell value starts with the same keychar the user pressed. That's the part that is giving me trouble.
Here's how I'm handling the event (updated with working solution):
private void dataGridView1_KeyPress(object sender, KeyPressEventArgs e)
{
if (Char.IsLetter(e.KeyChar))
{
...
I've got a DataGridView in a modal window with a list of options for my program. The grid has two collumns. The first one contains a checkbox for selecting that option, the seccond is the name/description of that option. The winform also contains OK and cancel buttons but that's beside the point. The code below does what I want it to. Be...
I have a data grid view which is constantly being updated. It doesn't perform the way i would like it to.
Can you guys suggest any alternative controls which you think are gonna handle updates faster?
Thanks.
////////////
no binding. when i use datasource its even worse.
i update an element like DepthGridBid.Rows[i].Cells[j].Value...
Hello there, I have a datagridview that i bind from an sql table, in that dv i have those attributes: Id, Name and Price. When i set the SortMode of the Name Columns to Automatic and i click on the header of this column i can sort this dv based on the first letter of the Name, this way i can order products based on their first letters ( ...
I have a DataGridView which I add data to programatically. I have the AutoSizeRowsMode set to AllCells and the WrapMode on RowsDefaultCellStyle set to True. If I add a multiline row to the DataGridView it shows up fine (autoscaling the row to show the multiple lines). However, if I hide the column that has the multiline data (so that the...
I have a DataGridView bound to a LINQ to SQL query expression. I want it to be editable for updates, but for inserts I want users to use separate controls below the grid (textboxes, date pickers, etc - currently not bound to anything). I have an "Add" button that creates an object of the linq to sql entity class based on the values in ...
I have a problem with a continue statement in my C# Foreach loop.
I want it to check if there is a blank cell in the datagridview, and if so, then skip printing the value out and carry on to check the next cell.
Help appreciated greatly.
Here is the code:
foreach (DataGridViewRow row in this.dataGridView1.Rows)
{ ...
Hello,
I have a datagridview control that is populated by a linq query:
public static IQueryable SearchByDepartmentNameInfo(string deptName)
{
ExamineDataContext dc = new ExamineDataContext();
var queryResult = from q in dc.GetTable<Question>()
where q.Topic.Module.Department.DepartmentNa...
I have a datagridview that is populated with 4 columns and multiple rows of data.
I want to iterate through the datagridview and get the cell value from A SPECIFIC COLUMN ONLY, since i need this data to pass into a method.
Here is my code:
foreach (DataGridViewRow row in this.dataGridView2.Rows)
{
foreac...
The situation is, that i need to create table in grid view looking like this:
----------| ID---|---Name--|--1/2002--|--2/2002--|--1/2003--|........| 2/2009 |
Cust1--|
Cust2--|
:
:
I have two tables in db - Customers and orders, throught LINQ to SQL DataContext
ID and Name of the customers i´m getting from a simple query
var custInfo = ...
I have a DataGridView where I manage manually the focused cells when navigating with TAB key. For example, when the first cell from the last row is the last cell than can be navigated in the DataGridView I want that when pressing 'TAB' the focus to go on the next focusable control (a button).
SendKeys.Send("{TAB}") will not work - the f...