Click here to Skip to main content

Silverlight / WPF

    RSS: RSS Feed

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
QuestionGeneric.xaml location PinmemberMikey_H20:04 20 Nov '09  
AnswerRe: Generic.xaml location PinmvpMark Salsbery9:02 22 Nov '09  
GeneralRe: Generic.xaml location PinmemberMikey_H15:15 23 Nov '09  
QuestionWPF Combo box PinmemberMember 34300140:40 20 Nov '09  
AnswerRe: WPF Combo box Pinmembersagar sali3:05 20 Nov '09  
GeneralRe: WPF Combo box Pinmemberrangana peiris5:24 20 Nov '09  
QuestionDataGrid binding to different enums in column Pinmemberreibor21:13 18 Nov '09  
Is it possible to bind different enums to one DataGridComboBoxColumn?
 
I need to display a couple of physical properties like temperatur, pressure, weight in a datagird. All these physical properties have a name, a physical unit and a value.
 

Public Class physicalProperty
 
Public Property name() As [Enum]
Get
....
End Get
Set(ByVal value As [Enum])
...
End Property
 

Public Property unit() As [Enum]
Get
....
End Get
Set(ByVal value As [Enum])
...
End Property
 

Public Property value() As double
Get
....
End Get
Set(ByVal value As double)
...
End Property
 
End Class

 

 

Each row of my datagird should show one physical property. The first column displays the name, the second the unit and
the third the value of the phy. property.
I would like to be able to change the unit in the datagrid with the help of a combobox.
All solutions I found for binding a enum to a datagridComboboxColumn used a ObjectDataProvider to set the itemssource for the datagridCombobox:
 

<ObjectDataProvider MethodName="GetValues"
ObjectType="{x:Type sys:Enum}"
x:Key="AlignmentValues">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="namespace:myEnum" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
 

 

But I don't have one enum. I have for each physical property one enum ( temperature (K, C, F), pressure (bar, Pa), weight (kg, g)).
 
Maybee I can use one enum for all physical units and dispaly only the valid ones by filtering?
 
Is there a way to meet my requirements?
reibor
AnswerRe: DataGrid binding to different enums in column PinmemberEslam Afifi11:42 19 Nov '09  
GeneralRe: DataGrid binding to different enums in column Pinmemberreibor7:28 22 Nov '09  
GeneralRe: DataGrid binding to different enums in column [modified] PinmemberEslam Afifi11:11 22 Nov '09  
QuestionHow to traverse through items inside ListBox in WPF? Pinmemberdilipms2:18 18 Nov '09  
AnswerRe: How to traverse through items inside ListBox in WPF? PinmemberEslam Afifi14:33 19 Nov '09  
Questionssrs report(RDL) using silverlight Pinmembersundaramoorthy.b2:14 18 Nov '09  
AnswerRe: ssrs report(RDL) using silverlight PinmvpMark Salsbery8:57 22 Nov '09  
QuestionThe Best Chart Tool for WPF Pinmemberwpftester0:10 18 Nov '09  
AnswerRe: The Best Chart Tool for WPF Pinmemberdaniel radford0:54 19 Nov '09  
QuestionBinding to a Database in WPF using LINQ-SQL PinmemberManinandan22:29 17 Nov '09  
QuestionOutofBrowser concept PinmemberGopal_Kanchana19:37 17 Nov '09  
AnswerRe: OutofBrowser concept PinmemberRavi Bhavnani20:06 17 Nov '09  
GeneralRe: OutofBrowser concept PinmemberGopal_Kanchana20:26 17 Nov '09  
QuestionWPF UserControl MouseEvents to Winform PinmemberMember 68348119:09 17 Nov '09  
AnswerRe: WPF UserControl MouseEvents to Winform PinmvpMark Salsbery21:04 17 Nov '09  
GeneralRe: WPF UserControl MouseEvents to Winform Pinmemberecklerpa5:10 18 Nov '09  
QuestionSilver Light Application Pinmemberrag_Singh0:03 17 Nov '09  
AnswerRe: Silver Light Application PinmemberKunalChowdhury4:57 11 Dec '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.5.120210.1 | Last Updated 13 Feb 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid