VS Bug on FormClosing datagridviewcomboboxcell value is not valid

Error message may be “Field called xxx does not exist”

Try this on Form closing

Private Sub frm_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
    Me.MyGridView.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.None
End Sub

I would hazard to suggest thatVisual Studio does not dispose of the datagridview in the correct sequence

This sometimes occurs when my personal code > SetUpDataGridView may programmatically set the AutoSizeRowsMode.

—–

This link http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/88c3adee-ed2a-41ee-9407-c3314588e08a/
Suggests it may be something to do with autosize, when there is a combobox created. The order of creation and setting may be important.

“If you autosize the column but have not provided the combo box column with a valid datasource or you haven’t yet added items to the combo box column’s items collection then you’ll get this error at startup because autosizing requires the cell’s FormattedValue to be requested. Requesting the FormattedValue of a combo box cell is where the check is done that may raise the data error exception you are seeing.

Set the autosize mode after you fill the combo box and things should be ok.

Mark Rideout – DataGridView Program Manager – Microsoft”

Or create the comboboxcolumn then clear the autosize modes > run > re-set the autosize mode.
Or programattically set the autosize after form has designer InitialiseComponent code has loaded.

Advertisements

SSRS Configuration – “user … does not have required permissions. Verify that .. and … UAC …

SOLVED

User ‘<server>\<username>’ does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.

“To get this resolved you need to start you Internet Explorer as Administrator -> Run as Administrator then open the url http://<Server name>/Reports this will take you to the “SQL Server Reporting Services” Home page
Click on the “Folder Settings” button.
Click on the “New Role Assignment” button.
Add the Group or user name: DOMAIN\USER_NAME, and permissions you have logged in as.
Click on Ok button.
This should resolve the issue.”

Dataset loses default connection My.MySettings when moved between projects

 
When moving dataset from one project to another, for example to create N-Tier then it may well lose the default connection. It is almost right but loses the My.MySettings bit.
 
Open DS.xsd file in notepad
Locate PropertyReference=”ApplicationSettings.ProjectName.MySettings.GlobalReference.Default.conStr…”
Change to PropertyReference=”ApplicationSettings.ProjectName.My.MySettings.GlobalReference.Default.conStrOperaDataset”