473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

C# App: Forms.AutoSizeMode' does not contain a definition for 'EnableStretch'

31
Hi,
I was given some code to look into it. When I tried to build the project it is giving this Error: 'System.Windows.Forms.AutoSizeMode' does not contain a definition for 'EnableStretch'

The Code that is giving the error is
(Columns[i].AutoSizeMode & AutoSizeMode.EnableStretch) == AutoSizeMode.EnableStretch)
I am using Visual C# 2005 Express Edition
Help me to get out of this problem

thanks in advance,
Nelluru
Apr 17 '07 #1
2 4898
You have to specify namespace "SourceGrid2" for every occurence of that error in code, and probably you have to specify same namespace in RowInfo.cs (starting at line 154, definitions of m_AutoSizeMode and AutoSizeMode) and ColumnInfo.cs (starting at line 155, definitions of m_AutoSizeMode and AutoSizeMode).
Dec 13 '07 #2
Plater
7,872 Expert 4TB
The only two values in my autosize enum are:
Expand|Select|Wrap|Line Numbers
  1. System.Windows.Forms.AutoSizeMode.GrowAndShrink;
  2. System.Windows.Forms.AutoSizeMode.GrowOnly;
  3.  
HOWEVER, the problem is you want to use column autosizemode, not forms autosize mode, which is happening becuase you don't specify the correct object/namespace (which max hinted at).

Try the DataGridViewAutoSizeColumnMode enum?
Dec 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
4
by: Bilo | last post by:
I have a Windows Forms Class MainGUI I have declared MainGUI maingui; public System.ComponentModel.Container components = new Container(); in the Class I call another class MediaDriver with...
4
by: Arjen | last post by:
What does this mean? 'Roles' does not contain a definition for 'RoleExists' I'm doing this: using System.Web.Security; Roles.DeleteRole(txtRolename.Text.Trim()); I don't see what's wrong. ...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
3
by: FayHuang | last post by:
Hi, I am very new beginner to ASP.NET, but I inherited this ASP.NET project from a person who left our company. So I hope that my problem is fairly simple to solve. Here is the background to...
14
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3 forms. I want allow users to move forward and backward with the forms and retain the data users have entered. I thought...
5
by: Burt | last post by:
There's an architect at my 200 person company that advocates having many layers in all my C# apps. He wants web services, use case handlers, facade layers, data gateways, etc. When I ask why all...
12
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.