473,396 Members | 2,108 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,396 software developers and data experts.

help with enum,webusercontrol,asp.net

hey all,
i'm trying to say something like the following but tripping up on syntax.
Basically, i'm trying to expose an enum that's inside my webusercontrol to my
client which is my .aspx page
private DisplayType _type;
public DisplayType Type
{
get { return _type; }
set { _type = value; }
}
public enum DisplayType
{
BarChart = OWC10.ChartChartTypeEnum.chChartTypeColumnClustere d,
PieChart = OWC10.ChartChartTypeEnum.chChartTypePie
}

thanks,
rodchar
Apr 9 '07 #1
3 1779
rodchar <ro*****@discussions.microsoft.comwrote:
hey all,
i'm trying to say something like the following but tripping up on syntax.
Basically, i'm trying to expose an enum that's inside my webusercontrol to my
client which is my .aspx page
private DisplayType _type;
public DisplayType Type
{
get { return _type; }
set { _type = value; }
}
public enum DisplayType
{
BarChart = OWC10.ChartChartTypeEnum.chChartTypeColumnClustere d,
PieChart = OWC10.ChartChartTypeEnum.chChartTypePie
}
I suspect you may just need a cast - but as you haven't shown the
compilation error, it's hard to say.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 9 '07 #2
Hi,
I'm using the Office Web Components to build a Chart Web User Control. Well,
as you probably already know, you can change the chart type to column, pie,
etc. and there is a whole enum list of them.

I guess my question is this:
what i'm trying to figure out is the best way to give the client of the
Chart Web User Control only 2 choices (DropDownList): Column Clustered and
the Pie Chart in the properties box. What's the best way to do this (looking
for syntax)?

I'm sorry if I'm not providing the best information as requested i just
don't have a complete program yet.

"Jon Skeet [C# MVP]" wrote:
rodchar <ro*****@discussions.microsoft.comwrote:
hey all,
i'm trying to say something like the following but tripping up on syntax.
Basically, i'm trying to expose an enum that's inside my webusercontrol to my
client which is my .aspx page
private DisplayType _type;
public DisplayType Type
{
get { return _type; }
set { _type = value; }
}
public enum DisplayType
{
BarChart = OWC10.ChartChartTypeEnum.chChartTypeColumnClustere d,
PieChart = OWC10.ChartChartTypeEnum.chChartTypePie
}

I suspect you may just need a cast - but as you haven't shown the
compilation error, it's hard to say.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 10 '07 #3
rodchar <ro*****@discussions.microsoft.comwrote:
I'm using the Office Web Components to build a Chart Web User Control. Well,
as you probably already know, you can change the chart type to column, pie,
etc. and there is a whole enum list of them.

I guess my question is this:
what i'm trying to figure out is the best way to give the client of the
Chart Web User Control only 2 choices (DropDownList): Column Clustered and
the Pie Chart in the properties box. What's the best way to do this (looking
for syntax)?
Well, I'm not sure on the UI front, but creating an enum like that
should be okay, although you'll need to cast the OWC10[...] enum values
to int first.
I'm sorry if I'm not providing the best information as requested i just
don't have a complete program yet.
That's okay - I thought you had code and a compilation error, that's
all.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 10 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Levin | last post by:
Hello Group, I'm using VisualStudio.NET and put a DataGrid into a WebUserControl (an ascx file). For the DataGrid element, I have set AllowSorting="True" and OnSortCommand="Grid_Sort".
1
by: DichkoSoft | last post by:
Hi I create WebUserControl and very confused when use control For Example: ***************************** *wuc.ascx ***************************** <script id=clientEventHandlersJS...
1
by: Edgardo Rossetto | last post by:
Hello there, I have inserted a UserControl within a DataList: /*------------------------------------------------------------*/ <asp:DataList ID="DataList1" runat="server" DataKeyField="ID"...
0
by: Christian H | last post by:
Hello, I've just created a WebUserControl that consists of a few other controls such as DropDownList, TextBox and Button. Based on the information entered in the DropDownlist, and TextBox, the...
2
by: Oren | last post by:
Hello everyone... I have a simple WebUserControl with Button and TextBox on it. Webform1.aspx contains this WebUserControl. How can I create my own C'tor for this WebUserControl - I mean when I...
2
by: Oren | last post by:
Hi everyone, I have WebUserControl on a Webform. How can I sent dynamically to the WebUserControl from a Function/Property on the Webform ? <uc:myuc id="myid1" CurrentPage=<%#GetText()%>...
0
by: Giovanni | last post by:
Dear Friends, I have a decision to make and hope to get some insight: I have built several WebUserControls one of which is a WebUserControl that queries an SQL server database, retrieves a...
0
by: Klaus Jensen | last post by:
Hi In a repeater-control, in the <SeparatorTemplatei have placed a webusercontrol, I have made. That works great- However, I want to know be able to only display this WebUserControl a certain...
1
by: deeparengan | last post by:
hi in asp.net i have a webusercontrol that has three dropdownlist.In the first dropdownlist i loaded the data at design time and in second dropdownlist i load the some data at run time according to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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.