Click here to Skip to main content
15,891,513 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Autosuggest textbox in WPF application Pin
AspDotNetDev23-Nov-09 20:40
protectorAspDotNetDev23-Nov-09 20:40 
QuestionGeneric.xaml location Pin
Mikey_H20-Nov-09 19:04
Mikey_H20-Nov-09 19:04 
AnswerRe: Generic.xaml location Pin
Mark Salsbery22-Nov-09 8:02
Mark Salsbery22-Nov-09 8:02 
GeneralRe: Generic.xaml location Pin
Mikey_H23-Nov-09 14:15
Mikey_H23-Nov-09 14:15 
QuestionWPF Combo box Pin
Member 343001419-Nov-09 23:40
Member 343001419-Nov-09 23:40 
AnswerRe: WPF Combo box Pin
sagar sali20-Nov-09 2:05
sagar sali20-Nov-09 2:05 
GeneralRe: WPF Combo box Pin
rangana peiris20-Nov-09 4:24
rangana peiris20-Nov-09 4:24 
QuestionDataGrid binding to different enums in column Pin
reibor18-Nov-09 20:13
reibor18-Nov-09 20:13 
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.

<br />
Public Class physicalProperty<br />
<br />
  Public Property name() As [Enum]<br />
    Get<br />
        ....<br />
    End Get<br />
    Set(ByVal value As [Enum])<br />
        ...<br />
  End Property<br />
<br />
<br />
  Public Property unit() As [Enum]<br />
    Get<br />
        ....<br />
    End Get<br />
    Set(ByVal value As [Enum])<br />
        ...<br />
  End Property<br />
<br />
<br />
  Public Property value() As double<br />
    Get<br />
        ....<br />
    End Get<br />
    Set(ByVal value As double)<br />
        ...<br />
  End Property<br />
<br />
End Class<br />





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:

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



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 Pin
Eslam Afifi19-Nov-09 10:42
Eslam Afifi19-Nov-09 10:42 
GeneralRe: DataGrid binding to different enums in column Pin
reibor22-Nov-09 6:28
reibor22-Nov-09 6:28 
GeneralRe: DataGrid binding to different enums in column [modified] Pin
Eslam Afifi22-Nov-09 10:11
Eslam Afifi22-Nov-09 10:11 
QuestionHow to traverse through items inside ListBox in WPF? Pin
dilipms18-Nov-09 1:18
dilipms18-Nov-09 1:18 
AnswerRe: How to traverse through items inside ListBox in WPF? Pin
Eslam Afifi19-Nov-09 13:33
Eslam Afifi19-Nov-09 13:33 
Questionssrs report(RDL) using silverlight Pin
sundaramoorthy.b18-Nov-09 1:14
sundaramoorthy.b18-Nov-09 1:14 
AnswerRe: ssrs report(RDL) using silverlight Pin
Mark Salsbery22-Nov-09 7:57
Mark Salsbery22-Nov-09 7:57 
QuestionThe Best Chart Tool for WPF Pin
wpftester17-Nov-09 23:10
wpftester17-Nov-09 23:10 
AnswerRe: The Best Chart Tool for WPF Pin
daniel radford18-Nov-09 23:54
daniel radford18-Nov-09 23:54 
QuestionBinding to a Database in WPF using LINQ-SQL Pin
Maninandan17-Nov-09 21:29
Maninandan17-Nov-09 21:29 
QuestionOutofBrowser concept Pin
Gopal_Kanchana17-Nov-09 18:37
Gopal_Kanchana17-Nov-09 18:37 
AnswerRe: OutofBrowser concept Pin
Ravi Bhavnani17-Nov-09 19:06
professionalRavi Bhavnani17-Nov-09 19:06 
GeneralRe: OutofBrowser concept Pin
Gopal_Kanchana17-Nov-09 19:26
Gopal_Kanchana17-Nov-09 19:26 
QuestionWPF UserControl MouseEvents to Winform Pin
EcklerPa 217-Nov-09 18:09
EcklerPa 217-Nov-09 18:09 
AnswerRe: WPF UserControl MouseEvents to Winform Pin
Mark Salsbery17-Nov-09 20:04
Mark Salsbery17-Nov-09 20:04 
GeneralRe: WPF UserControl MouseEvents to Winform Pin
Patrick Eckler18-Nov-09 4:10
Patrick Eckler18-Nov-09 4:10 
QuestionSilver Light Application Pin
rag_Singh16-Nov-09 23:03
rag_Singh16-Nov-09 23:03 

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

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