Telerik Forums
UI for WPF Forum
4 answers
145 views
i have done that task ,now i want bind specific Combo box column of specific row .
my code is like this 
Xml
  <Grid>
        <Grid.Resources>
                       <Style TargetType="telerik:RadComboBox">
                <EventSetter Event="SelectionChanged" Handler="ComboBox_SelectionChanged" />
            </Style>
        </Grid.Resources>
        <UI:ModuleControl x:Name="mdParticipantWI" IsShowIcon="False"
                          Title="Participant Wellness Incentives"
                          Margin="8">


            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <StackPanel  VerticalAlignment="Top">
                    <TextBlock Name="txtUserName"
                               Style="{StaticResource SectionTitleStyle}" />
                    <TextBlock />
                    <TextBlock Text="Risk Factor Overrides"
                               Style="{StaticResource SectionTitleStyle}" />
                    <StackPanel>
                        <UI:UcToolbar IsShowNewButton="True" IsShowDeleteButton="True" IsShowCancelButton="True" IsShowEditButton="True" IsShowSaveButton="True" x:Name="UcToolbar1"></UI:UcToolbar>
                        <telerik:RadGridView x:Name="grdRiskFactorOverrides"
                                     ShowGroupPanel="False"
                                     Margin="0 8 0 0"
                                     AutoGenerateColumns="false">
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ewip_id}"
                                    UniqueName="Models"
                                                    IsComboBoxEditable="false"
                                                    Header= "Model"
                                                    HeaderTextAlignment="Center"
                                                    SelectedValueMemberPath="ewip_id"
                                                    DisplayMemberPath="ewip_title" 
                                                    Width="200" />
                                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ewrf_id}"
                                    UniqueName="RiskFactors" Name="RiskFactors"
                                                    IsComboBoxEditable="True"
                                                                IsEnabled="True"
                                                              Header= "Risk Factor"
                                                    HeaderTextAlignment="Center"            
                                                    SelectedValueMemberPath="ewrf_id"
                                                    DisplayMemberPath="risk_factor" 
                                                    Width="150" />
                                <telerik:GridViewDataColumn  Header="Reason for Override"
                                                     DataMemberBinding="{Binding reason}"
                                                     Width="*" />
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>


                        <!--<UI:MaestroGridView  x:Name="grdRiskFactorOverrides"
                                     ShowGroupPanel="False"
                                     Margin="0 8 0 0"
                                     AutoGenerateColumns="false">
                            <UI:MaestroGridView.Columns>
                                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ewip_id}"
                                    UniqueName="Models"
                                                    IsComboBoxEditable="True"
                                                    Header= "Model"
                                                    HeaderTextAlignment="Center"            
                                                    SelectedValueMemberPath="ewip_id"
                                                    DisplayMemberPath="ewip_title" 
                                                    Width="200" />
                                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ewrf_id}"
                                    UniqueName="RiskFactors"
                                                    IsComboBoxEditable="True"
                                                    Header= "Risk Factor"
                                                    HeaderTextAlignment="Center"            
                                                    SelectedValueMemberPath="ewrf_id"
                                                    DisplayMemberPath="risk_factor" 
                                                    Width="150" />                                
                                <telerik:GridViewDataColumn  Header="Reason for Override"
                                                     DataMemberBinding="{Binding reason}"
                                                     Width="*" />
                            </UI:MaestroGridView.Columns>
                        </UI:MaestroGridView>-->
                        <telerik:RadDataPager Height="24" />
                    </StackPanel>


                </StackPanel>
            </Grid>
        </UI:ModuleControl>
    </Grid>

coding part:

  Private Sub ComboBox_SelectionChanged(ByVal sender As Object, ByVal e As SelectionChangedEventArgs)
        Dim comboBox As RadComboBox = DirectCast(e.OriginalSource, RadComboBox)
        If comboBox.SelectedValue Is Nothing OrElse comboBox.SelectedValuePath <> "ewip_id" Then
            Return
        End If
        If Not comboBox.SelectedValue Is Nothing Then
            Dim selectedCountry As Int32 = DirectCast(comboBox.SelectedValue, Int32)
            ' Dim test As String = Me.grdRiskFactorOverrides.SelectedItem
            Dim i As Integer = Me.grdRiskFactorOverrides.Items.IndexOf(Me.grdRiskFactorOverrides.SelectedItem)


            Dim objWellnessIncentiveMethods As New WellnessIncentiveMethods
            Dim riskFactorsList As New List(Of MaestroLibrary.riskFactors)
            riskFactorsList = objWellnessIncentiveMethods.fnGetRiskFactors(selectedCountry)
            Dim gridViewComboColumn As New GridViewComboBoxColumn()
            gridViewComboColumn.DataMemberBinding = New System.Windows.Data.Binding("ewrf_id")
            gridViewComboColumn.UniqueName = "RiskFactors"


            Try
                'If DirectCast(grdRiskFactorOverrides.Rows(0).Cells(5).Value, Decimal) > 10 Then
                '    grdRiskFactorOverrides.Rows(0).Cells(5).Value = 10
                'End If
                'DirectCast(Me.grdRiskFactorOverrides.Columns("RiskFactors"), GridViewComboBoxColumn).ItemsSource = riskFactorsList


                Dim countries As GridViewComboBoxColumn = TryCast(Me.grdRiskFactorOverrides.FindName("RiskFactors"), GridViewComboBoxColumn)
                countries.ItemsSource = riskFactorsList(here i want to find clicked row specific column and want to provide item source)





                'Dim aa As GridViewRowDetailsEventArgs
                'Dim countries2 As GridViewComboBoxColumn = TryCast(aa.DetailsElement.FindName("RiskFactors"), GridViewComboBoxColumn)


            Catch ex As Exception


            End Try


            gridViewComboColumn.SelectedValueMemberPath = "ewrf_id"
            gridViewComboColumn.DisplayMemberPath = "risk_factor"


            ' bindComboRiskFactors(selectedCountry)


        End If
    End Sub

i have requested to telerik support team,please help me to solve that issue.if you want to ask any thing regarding that,you can ask
vikas gupta
Top achievements
Rank 1
 answered on 29 Nov 2011
1 answer
84 views
Hi!

Was trying to bind to zoomscrollsettingsx.RangeStart but it doesn't seem to work. I found this issue in the silverlight forum:
http://www.telerik.com/community/forums/silverlight/chart/binding-problem-zoomscrollsettingsx-rangestart.aspx

Has this been solved in silverlight but not in wpf?
Ves
Telerik team
 answered on 29 Nov 2011
1 answer
120 views
Hello.

I am trying to enable a Buttom when somebody check a column on a RadGridView ...

it is the classic example of delete row ... I want to enable the delete buttom when somebody check at least one row in the grid.

Here is my code:

<telerik:RadButton Margin="2" Name="deleteApplicationButton" Click="deleteApplicationButton_Click" IsEnabled="False">
                           <Image Source="component/Resources/tool_bar_delete.png" Stretch="None" ToolTipService.ToolTip="New Application" />
                       </telerik:RadButton>
                   <telerik:RadGridView Grid.Row="1"                                         
                                        CanUserFreezeColumns="False"
                                        ShowGroupPanel="False"
                                        ItemsSource="{Binding Path=Applications, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                        AutoGenerateColumns="False"                                          
                                        SelectionChanged="RadGridView_SelectionChanged"                                          
                                        Name="RadGridViewApplication" 
                                        IsSynchronizedWithCurrentItem="True" 
                                        CellEditEnded="RadGridViewApplication_CellEditEnded">                       
                       <telerik:RadGridView.Columns>
                           <telerik:GridViewCheckBoxColumn Header="Delete" DataMemberBinding="{Binding Path=IsChecked}"></telerik:GridViewCheckBoxColumn>
                          <!-- <telerik:GridViewDataColumn Header="Disable" DataMemberBinding="{Binding Path=Disable}" /> -->
                           <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Path=Key}"  IsReadOnly="True" />
                           <telerik:GridViewDataColumn Header="Description" DataMemberBinding="{Binding Path=Description}" Width="*" IsReadOnly="False" />
                           <telerik:GridViewDataColumn IsVisible="False" Header="GUID" DataMemberBinding="{Binding Path=GUID}" Width="*" IsReadOnly="False" />                            
                       </telerik:RadGridView.Columns>

Please, how can I do it ... Could anybody provide a simple example?

Thanks a lot
Petar Mladenov
Telerik team
 answered on 29 Nov 2011
13 answers
2.2K+ views
Hi

I have managed to change most of the appearance of the date time picker to fit in with my application by using a modified metro theme.
The only thing that I can't seem to do is change the font size.

Is there an easy way to do this?

I really don't want to have to generate a huge style file using blend - I don't have Blend for starters and I have downloaded an example date time style and it's huge. I just don't have the time to pick through it. I just want to increase the font size.

Any ideas?

Cheers

Steve
Dani
Telerik team
 answered on 29 Nov 2011
1 answer
137 views
The pop-up font editor does not abide by the set theme (see attachment). In the rich text box, when a word is highlighted and hovered over, a pop-up appears allowing the user to quickly modify the selected word's font. This pop-up is only partially styled based off of the set theme, even when the theme is set as follows:
StyleManager.ApplicationTheme = new Expression_DarkTheme();

Is there a way to address this issue, or failing that, a way to disable the pop-up?
Boby
Telerik team
 answered on 29 Nov 2011
1 answer
123 views

For example, I have an ObservableCollection with 10000 items, and I want to add 1000 items to this collection. If I were to add the 1000 items one by one, it would be painfully slow because of the 1000 CollectionChanged events fired. The second option is to use the RadObservableCollection's SuspendNotifications and Reset methods. This option is more tolerable but it's still not desirable as adding 1000 items causes the control to reload the whole collection of 11000 items. Is there a better way to add 1000 items with a single CollectionChanged event being raised that is not a Reset action?


Thanks.
Vlad
Telerik team
 answered on 29 Nov 2011
1 answer
73 views
My application can open items in either the document host of a RadDocking control, or open them into a new window (not a docking floating window).

When the item is opened and put into the Docking control, the CPU Usage of the program constantly busy, anywhere from 2-7 % (relative per machine of course) As soon as i close my item, the CPU goes back down to 0 and never moves.

If I open the item into a new window, the CPU usage does not move as the program sits, like it does when it is docked in the docking control.

Any idea why I might have this Issue?
George
Telerik team
 answered on 28 Nov 2011
1 answer
62 views
Hi,
I'm trying to make a visibility of an item depends on its property.
Searcing the forum gave me several similar questions but I could not find the answer.
I hope someone take a look at this problem.
Many thanks.


Chris
Top achievements
Rank 1
 answered on 28 Nov 2011
1 answer
110 views
I'm interested in replaying a control's default animations when it's visibility changes to Visible.  If it matters, I'm particularly interested in RadChart and RadTileView animations.  Are there examples that accomplish this?

Thanks,
Kevin
Yana
Telerik team
 answered on 28 Nov 2011
1 answer
104 views
When a chart is first populated with data, the series are drawn with animation.

I would like to repeat this animation when the chart comes back into focus (e.g. if the form is minimised, then I would like to show the animation again when the form is maximised).

Does anyone know how to replay the animation?

Thanks.
Sia
Telerik team
 answered on 28 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?