newrow

Add New Row to GridView without DataBind

Hello all, I have a GridView that allows editing the values in every column, in every row, all the time. The user enters in all their changes, clicks Save once and all changes are commited. The user must also be able to click the New button, have a new row appear in the GridView (yep, it has to show up in the actual GridView), enter w...

DataGridView CurrentRow excludes new row

I want to get the index of the current row of my DataGridView. The problem is, that if the current row is the new row, CurrentRow is set to the last row that is not the new row. I cannot check for the rows to be selected because if a row is selected that doesn't mean it is the current row and the current row isn't necessarily selected. ...

How to get schema of our table without filling its DataTable before calling NewRow method?

Hi all. I know that I should have schema of a table before calling NewRow method in order to add a new row to a DataTable.... But as you know, having the schema of a table means filling its DataTable by records from DB. This means connecting to DB and fetch records. Is there any way to have schema without performing a select statement?...

Inserting extra data in a linq result but not to the data source or waiting for submiting changes on a context object

When I had a Typed DataTable with information retrieved from a SQL Server with a table adapter, I'm able to insert temporary data into that DataTable which I just want to use on execution time, and I don't want it to be inserted into the database. First supose that for example I have a Database table like this: CREATE TABLE MyData ( ...

wpf datagrid - sourcecollection count is 0 newitemplaceholder is not shown

After deleteing all the items in the bound collection, the datagrid.items.count is 1 and the only item in the item collection is newitemplaceholder but the datagrid does not show the newitemplaceholder. This can only occur if the last item is the newitemplaceholder and you attempt to edit it but instead of hitting enter you click the but...