Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Property Greyed Out in VS

Reply
Thread Tools

Property Greyed Out in VS

 
 
jcteague@gmail.com
Guest
Posts: n/a
 
      11-09-2005
I have a Server Control that inherits from DataGrid. I've added an
object type property called DataMethodParameter, but this property is
greyed out in the properties list in Visual Studio.

private object dataMethodParameter = null;

[Category("Data"),
Description("Parameter to Pass to the selected OrdersProvider Method")]
public object DataMethodParameter
{
get{return this.dataMethodParameter;}
set{this.dataMethodParameter = value;}
}

Any suggestions?

 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      11-09-2005
The datatype is object. If it were int or string then VS.NET would be able
to parse it and know what to expect.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> I have a Server Control that inherits from DataGrid. I've added an
> object type property called DataMethodParameter, but this property is
> greyed out in the properties list in Visual Studio.
>
> private object dataMethodParameter = null;
>
> [Category("Data"),
> Description("Parameter to Pass to the selected OrdersProvider
> Method")]
> public object DataMethodParameter
> {
> get{return this.dataMethodParameter;}
> set{this.dataMethodParameter = value;}
> }
> Any suggestions?
>



 
Reply With Quote
 
 
 
 
jcteague@gmail.com
Guest
Posts: n/a
 
      11-09-2005
Well, that poses a problem. The datatype could be practically
anything. I am casting it in the code based on other parameters. Any
suggestions on how I could do this other than making it a string and
using Convert. That could pose some problems as well.

 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      11-09-2005
What is it supposed to represent? If it can be almost anything, then wouldn't
that mean it'd have to be set at runtime? I mean, anything could be an Int32,
a System.Drawing.Color, or a System.Xml.XmlDocument, right?

-Brock
DevelopMentor
http://staff.develop.com/ballen

> Well, that poses a problem. The datatype could be practically
> anything. I am casting it in the code based on other parameters. Any
> suggestions on how I could do this other than making it a string and
> using Convert. That could pose some problems as well.
>



 
Reply With Quote
 
jcteague@gmail.com
Guest
Posts: n/a
 
      11-09-2005
Yes and No.
This is a CodeSmith template to work with the NetTiers project. I am
generating Custom DataGrids for their providers. Based on which
provider method the choose I can cast appropriately. They have a
built-in method for getting the right type. I think this just means I
have a little more work.

Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Button Greyed out in Wireless Network Connection Properties JFountai@schwarzusa.com Wireless Networking 1 09-02-2005 02:32 PM
PEAP username/domain greyed out Bruce Wayne Wireless Networking 1 08-18-2005 08:52 PM
network id greyed out =?Utf-8?B?bWEyMg==?= Wireless Networking 0 11-12-2004 02:09 AM
ToolBox Greyed Out John H ASP .Net 2 07-21-2004 10:59 AM
'log on as a batch job' assignment greyed-out in WinXP murdo[nospam] ASP .Net 0 12-16-2003 02:50 PM



Advertisments