Click here to Skip to main content
16,005,120 members

Comments by fheyn (Top 25 by date)

fheyn 22-Feb-18 12:07pm View    
first of all thanks a lot for your response
when a set AllowUserToAddRows = false the dgv comes up empty and I can't add data at all (not the way I want to)
meanwhile I've replace the database-table with a local table that just contains the id-column (visible here).
I click the cell and get the same result : dgv shows three rows with the id in first row.
fheyn 22-Feb-18 4:40am View    
Deleted
@RickZeeland
private void DataGridLayout()
{
Item.DataSource = SourceTable;
Item.Columns["ID"].Visible = false;
}

DataTable SourceTable { get { return(Database.Datatable(ItemName); }}
fheyn 22-Feb-18 4:39am View    
@RickZeeland
private void DataGridLayout()
{
Item.DataSource = SourceTable;
Item.Columns["ID"].Visible = false;
}

DataTable SourceTable { get { return(Database.Datatable(ItemName); }}

Item is the dgvcontrol within the mdichild frmItem. Every form represents ONE
specific Item (i.e. a person, a car, a street...)
Database is a class that incorporates sqlserver and sqlite. (this project uses sqlite). Datatable is the table of the underlying tableadapter.
fheyn 12-Jan-18 18:05pm View    
if that's the only solution it's not applicable to my project.
the datagridview belongs to a baseform which subclasses several forms each using the dgv in a diffent way (columncount varies from 5 to 12)
using the solution shown leaves me with more work than I do have populating dgv
from each subform.
anyhow thanks for your answer
franz
fheyn 26-Jan-15 6:20am View    
frmSettings is the form where all the applicationdata can be edited.
frmSettings also saves and loads the applicationdata to the config-file.
I found a bit more precise exception description :
"rotatedImage.Palette" caused "System.Runtime.InteropServices.ExternalException"
ErrorCode = -2147467259