I have a DataGridView that allows users to enter new information. Using subsonic I Save the new info to the database. And this works correctly. My problem is that after the Save is done the newly added row disapears from the grid. I tried to Reload the form, but I get an error "Operation is not valid because it results in a reentrant cal...
In the event handler for CellValueChanged, for a certain condition, I want the focus to stay in the cell and clear its content. What's happening is focus (cursor) is in the next cell when the handler finishes its work. It needs to be in the same cell that caused the event.
MyGrid.CellValueChanged -= new DataGridViewCellEventHandler(Cell...
Some event handlers for the WinForm DataGridView have DataGridViewCellEventArgs as a parameter and a ColumnIndex as a property of that argument.
ColumnIndex is a number representing the column's ordinal #.
Is there a way to reference a column name from that argument instead of column index?
So instead of doing:
if (e.ColumnIndex == 1...
If you have a DataGridView that is bound to a DataView (someDataTable.DefaultView).
..and a number of edits are performed on rows in the underlying DataTable from code.
Is it possible to defer the updating of the DataGridView until you decide that you are finished editing rows?
As it is, the DataGridView is updated after every edit, w...
I need to add an event handler to an inherited control like a datagridview but Visual Studio doesn't allow me. Isn't there a way for an inherited control to fire a base event handler AND the inherited one? in a sequence I specify?
...
I have a DataGridView with AllowUserToAddRows=true. The first column is an Id string which has to be unique. What's the best way to check that the Id the user entered hasn't been entered before?
...
how can we embed the calendar component in cell of a data grid view. actually my requirement is to catch the date of birth in column of one data grid view.
...
HI, I've a DataGridView with this setting: d
dataGridView1.AllowUserToOrderColumns = true;
(so the users can reorder columns)
My problem is that I want to know the current order of columns.
I've done this methond:
public List<int> getActualTaskOrder() {
List<int> ris = new List<int>();
int i=1;
...
I am using a DataGridView with a DataTable as a stack for some values. Something gets recorded into the DataTable rows and then I send them somewhere in a FIFO fashion - it would be very nice to draw the rows in a bottom->up(to stack them up) direction instead of a up->down direction.
How can I achieve this since the paint events are on...
I am setting the width of a WinForm datagridview column to 140 and I am checking the width and it's 100. The grid is wide enough to make all columns wider. Why isn't the column accepting the 140 value? Is there a setting which controls the max width?
MyGrid.Columns["Name"].Width = 140;
int i = MyGrid.Columns["Name"].Width; //why is i = ...
First post, but long time browser :)
So here's my problem: Basically I have a datagridview that I am using to interact with the user. In all of the rows, there is an "info" button that will give the illusion that it adds another row below it with all of the cells merged (one long cell across entire row) and draws the text and images d...
In C#, I have a table displayed using a DataGridView. The table is significantly smaller than the form in which it appears, and so the table fills only a small portion of the upper-left-hand corner of the form.
My question: how can I (programmatically) make either: (1) the table automatically enlarge so that it fills the form, or (2) ...
I've searched all over and I can't figure this one out. I am working on a Winforms UI that is pulling large volumes of rows that I need to display in a DataGridView. I have already read all about limiting row counts and paging and there is absolutely no good way for me to do this. Basically I am working on the TargetDataViewer control...
I'd like to display a linq-to-sql on a datagridview as such:
Dim myQ = From b In _dcBooks.Books Select New With {Key b.ID, b.Title, b.Genre, b.ISBN, b.Format, b.Series, _
.Author =b.BooksAuthors.Count()}
the formula for the authors column is simplified as it would normally display nothing, the only author or "multiple".
...
hihi,
how i clear all data and not delete data or column in datagridview?
i wan clear the data first and query on the result to make the result not duplicate..
can anyone help me??
...
Dear ladies and sirs.
I have to choose a commercial WPF UI control library for our project.
Browsing the web I have found these major vendors:
Actipro: http://www.actiprosoftware.com/Products/DotNet/WPF/WPFStudio/Default.aspx
Telerik: http://www.telerik.com/products/wpf.aspx
Xceed: http://xceed.com/pages/TopMenu/Products/ProductSear...
I have a DataGridView bound to an entity framework object called "Person". All the main fields of person such as Name etc show correctly, but the fields that are referenced to child tables (e.g. "Place of Birth") only show the entity name/type in the datagridview.
How do I navigate through to correctly show the values of child entities ...
Hello all,
I have a hierarchy of objects that all implement INotifyPropertyChanged. I also have a custom list that derives from BindingList.
It is my understanding that when I add an object that impelements INotifyPropertyChanged to the list, that somehow the PropertyChanged event is automagically wired-up / converted to the ListChange...
As a question similar to this question, I also have an application with a DataGridView on it. I would like to position the rows such that a specific row is at the bottom of the visible part of the list.
This is in response to a button click that moves a row down by one. I want to maintain the selection on the row I'm moving (I already h...
I am writing a class to print the contents of a DataGridView, however I'm having trouble extracting the names of the header row. I'm using .NET 3.0.
Is there an easy way of doing this?
I have seen some methods whereby the controls collections are used, E.g.
columnTitle = myDataGrid.Controls[0].Controls[0].Text;
however I've yet to g...