Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Datagridview + tabcontrol designer issue.
 

Datagridview + tabcontrol designer issue.

Well I posted this in the databinding section and heard nothingbut the whistling of the wind and the tumbleweedbouncing across the ground.

Ithink Ihave a problem with the datagridview (or perhaps the tab control?) and sourcesafe.

Steps to Reproduce:

  • Create a test windows project and put it in source safe.
  • Create a data set and link to a SQL database (northwind for example)
  • Add a table
  • Save the dataset
  • Open form1 in design mode
  • add a tab control
  • Add a datagridview to the second page
  • bind it (using the designer) to one of the tables in your database.
  • save
  • check in
  • close the designer
  • open form1 inthe designer.

This is where we hit our problem, it prompts for checkout everytime, if you say yes to checkout and then when you save and do a diff in sourcesafe the files are identical.

If you cancel you get a string of checkout error messages and then (finally) the form is displayed. Choose the second tab, you get prompted for checkout again if you cancel you get an exception message in the place of the tab control.

It has to be bound, so I think the designer is uneccisarily attempting to re-write the databindings code, even though they haven't changed, but this is only a hypothesis.

Any help would be greatly appreciated, this is becoming a real problem for us as many of our forms have bound datagrids on tabcontrols, and often you want to view a file without modifying it.

I have read some posts for a similar problem in webforms that suggest setting sourcecontrol to do nothing on edit is the solution, this doesn't seem right to me, it seems to be a (not very good) workaround.

Cheers,

Squiddy  Wednesday, October 18, 2006 10:45 PM
sorry squiddy,

are you using vs2005 for this? if this is reproducible, there must be a bug in one of the designer classes being used, then you should file for this bug. i haven't encountered this since i rarely use strongly typed dataset in my projects.


i am using vs2003 and with web projects it consistently regenerates the page directives which is also a PITA. we just compare it if it is the only difference then revert it. You can get away with the extra messagebox with sourcesafe i think by disabling the readonly attribute being used by VSS if a code is checked in, i think there's an option for VSS to not to this.
joeycalisay  Tuesday, November 21, 2006 10:29 AM
i experienced this before when one of the controls with a designer class has changed one of its properties and always notifies the designer of the change, in turn the windows forms designer needs to re-generate/serialize the changes so it has to be writable/not locked by the source control. it could be that one of the components, that you are using are causing this change notification.
joeycalisay  Thursday, October 19, 2006 11:37 AM

Joey,

How did you rectify it? it there anyway to inherit the designer and work out what property it is 'changing' andoverride the property and get it to serialize properly?

I of course would like to see this fixed by MS, but I would like something in the mean time.

Cheers

Squiddy  Thursday, October 19, 2006 10:45 PM
Still getting this, can anyone help?
Squiddy  Monday, November 20, 2006 3:14 AM
sorry squiddy,

are you using vs2005 for this? if this is reproducible, there must be a bug in one of the designer classes being used, then you should file for this bug. i haven't encountered this since i rarely use strongly typed dataset in my projects.


i am using vs2003 and with web projects it consistently regenerates the page directives which is also a PITA. we just compare it if it is the only difference then revert it. You can get away with the extra messagebox with sourcesafe i think by disabling the readonly attribute being used by VSS if a code is checked in, i think there's an option for VSS to not to this.
joeycalisay  Tuesday, November 21, 2006 10:29 AM

You can use google to search for other answers

Custom Search

More Threads

• Disabling windows forms designer temporarily
• Event Publisher not Publishing?
• MonthCalendar cannot be modified in the designer
• Inherited forms - Designer adds code with third party control
• cloning a listview
• How to Print a form in C#?
• Treeview - Problem with multiple languages
• Paiting user control at design-time not correctly working [Using OnPaintAdornments()]
• How to generate <Form>.Designer.cs files for old projects?
• Can a control that uses 'xpFocusProvider' work inside userCtrl?