473,386 Members | 1,779 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,386 software developers and data experts.

Property Descriptor

I am trying to use a propertydescriptor to alter the color of a column in a
DataGrid. I have a button1 on the form that has a red color and I want to
copy this red color property (forecolor) to my DataGridTextBoxColumn.
However, it just ignores it.
Dim pdc As PropertyDescriptorCollection =
TypeDescriptor.GetProperties(Button1)
Dim c2 As DataGridTextBoxColumn = New DataGridTextBoxColumn(pdc.Find
("ForeColor", False))

Is this even possible?
--
Dennis in Houston
Nov 21 '05 #1
1 1077
Hi,

You need to create your own datagrid textbox column to change the
back color. Here is an example.
http://www.onteorasoftware.com/Downl...redcolumns.zip

Ken
-------------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
I am trying to use a propertydescriptor to alter the color of a column in a
DataGrid. I have a button1 on the form that has a red color and I want to
copy this red color property (forecolor) to my DataGridTextBoxColumn.
However, it just ignores it.
Dim pdc As PropertyDescriptorCollection =
TypeDescriptor.GetProperties(Button1)
Dim c2 As DataGridTextBoxColumn = New DataGridTextBoxColumn(pdc.Find
("ForeColor", False))

Is this even possible?
--
Dennis in Houston
Nov 21 '05 #2

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

Similar topics

3
by: kepes.krisztian | last post by:
Hi ! I want to create a property that can use parameter(s). In Delphi I can create same thing (exm: Canvas.Pixel -> Canvas.GetPixel(self,X,Y):integer; Canvas.SetPixel(self,X,Y,Color::integer); ...
11
by: Laszlo Zsolt Nagy | last post by:
My problem is about properties and the virtuality of the methods. I would like to create a property whose get and set methods are virtual. I had the same problems in Delphi before and the solution...
18
by: Robin Becker | last post by:
Is there a way to override a data property in the instance? Do I need to create another class with the property changed? -- Robin Becker
1
by: rhungund | last post by:
Hi all...I have a stored proc that works fine except I can't get the paging property to work in ASP. It seems that because I'm building the SQL withing the SP is causing the problem. If I don't...
25
by: Michal Kwiatkowski | last post by:
Hi, Code below shows that property() works only if you use it within a class. ------------------------------------------------ class A(object): pass a = A() a.y = 7
11
by: Andrus | last post by:
I'm implementing entity object which should populate its properties from database when property is first referenced. In RDL reports I use object properties like MyObject.MyProperty MyObject...
1
by: gamehack | last post by:
Hi all, I was looking around the net to figure out how I can use the property() descriptor to make a property readable by everyone and only settable by the class or any derived classes. Thanks....
12
by: andrew cooke | last post by:
Hi, This is my first attempt at new classes and dynamic python, so I am probably doing something very stupid... After reading the how-to for descriptors at...
5
by: Rafe | last post by:
Hi, I've been thinking in circles about these aspects of Pythonic design and I'm curious what everyone else is doing and thinks. There are 3 issues here: 1) 'Declaring' attributes - I...
0
by: Ben Finney | last post by:
Daniel <millerdev@gmail.comwrites: The fact that the 'property' function works as a decorator (in, as you point out, some cases only) is a happy accident. The 'property' function isn't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.