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

ProvidePropertyAttribute

Hi:

How to set the default value of the ProvideProperty ?
My ExtenderProvider only accept control, and it has a internal
hashtable which is use to holds the property values for individual
controls, currently the hashtable hold all the control on the form
regardless whether i set the provided property or not, how do i
enabled it so that only the control which i set the provided property
will save to the hasktable ? My guess is the default value like the
ordinary property do, any idea ?

Thanks
JCVoon
Nov 21 '05 #1
2 985
JC Voon,

Can you show some code, because I assume that most probably I understand you
wrong.

Cor
"JC Voon" <jc*******@yahoo.com> schreef in bericht
news:41***************@msnews.microsoft.com...
Hi:

How to set the default value of the ProvideProperty ?
My ExtenderProvider only accept control, and it has a internal
hashtable which is use to holds the property values for individual
controls, currently the hashtable hold all the control on the form
regardless whether i set the provided property or not, how do i
enabled it so that only the control which i set the provided property
will save to the hasktable ? My guess is the default value like the
ordinary property do, any idea ?

Thanks
JCVoon

Nov 21 '05 #2
Cor Ligthert:

Can you show some code, because I assume that most probably I understand you
wrong.


Thanks for the reply, i already figure it out.

Private Class MyProvidedProperties
Public MyProperty As string = string.Empty <----- A
....
end class

...
..
Function GetMyProperty(ByVal ctrl As Control) As String
If htProvidedProperties.Contains(ctrl) Then
Return DirectCast(htProvidedProperties(ctrl),
MyProvidedProperties).MyProperty
Else
Return String.Empty <----- B
End If
End Function

Make sure A and B is same value.

Thanks
JCVoon
Nov 21 '05 #3

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

Similar topics

0
by: Ed West | last post by:
I can't get this to work with more than 1 provideproperty attributes... only the first one is showing up on the properties tab in a form... any ideas? thanks ie public class...
13
by: parez | last post by:
Whats the best way of implementing authorization in a win forms application. I mean things like show/hide or enable/disable Save button ,creating context menus etc.
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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...

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.