Passing Property Descriptor to DataGridTextBoxColumn Constructor 
Author Message
 Passing Property Descriptor to DataGridTextBoxColumn Constructor

Can anyone explain what passing a property descriptor to a
DataGridTextBoxColumn constructor achieves?

Given the following code:

Dim lobj_PropDescriptor as PropertyDescriptor
Dim lobj_CurMgr As CurrencyManager

lobj_CurMgr =
CType(Me.BindingContext(MyCollectionToBind),CurrencyManager)lobj_PropDescrip
tor = lobj_CurMgr.GetItemProperties().Item("MyProperty")
lcol_MyNewCol = New DataGridTextBoxColumn(lobj_PropDescriptor)

I would have thought that the MappingName would be automatically determined.
Not only is it not, but if I do away with the PropertyDescriptor altogether,
I still get the datagrid column bound correctly to my property.

So if this works:

lcol_MyNewCol = New DataGridTextBoxColumn()
lcol_MyNewCol.MappingName = MyProperty

Then what is the point/benefit of passing the PropertyDescriptor?

TIA,

Raj (M)



Sat, 25 Jun 2005 15:49:18 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Why do property descriptors change case??

2. can't change the control property of a Security Descriptor of a file

3. passing parameters to the constructor

4. Passing variables to Class Module Constructor

5. adding 'tooltip' descriptors to constructors in visual basic .net

6. datagridtextboxcolumn editing.

7. Formatting string value in DataGridTextBoxColumn

8. Disable DataGridTextBoxColumn?

9. mousedown event of datagridtextboxColumn

10. Extended DataGridTextBoxColumn, now DataGrid repaints much slower

11. DataGridColumnStyle other than the default DataGridBoolColumn & DataGridTextBoxColumn

12. Override DataGridTextBoxColumn class to set cell color

 

 
Powered by phpBB® Forum Software