IsReadOnly does seem to work

11 posts, 0 answers
  1. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 18 Nov 2009 Link to this post

    Hi..
    I set

    IsReadOnly

    = true  , in code

    But I can still change the values and select other items.
    How do I lock the combo box ?  Any idea what I'm doing wrong?
    thanks

  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 18 Nov 2009 Link to this post

    Hi Jon,

    Just like the standard WPF ComboBox, IsReadOnly has effect only when IsEditable = true, but does not prevent the user from selecting values - it just makes the editable text box read-only. To completely prevent the control from selection you should use IsEnabled = false.

    Greetings,
    Valeri Hristov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 18 Nov 2009 Link to this post

    Hi..
    When I change the IsEditable = false - the controls are barely visible.
    How can I 'keep' the same style - but just 'lock them down'?

    thanks again
  5. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 24 Nov 2009 Link to this post

    Hi Jon,

    We are sorry for the delay in our reply.

    As far as I understand, you need your combo box to be displayed normally, but behave as it is not enabled (i.e. as if IsEnabled="False"). If so, you can use set the IsHitTestVisible property to False. Thus it will not respond to user input.

    Let me know if this workaround works for you. 

    Kind regards,
    Teodor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 24 Nov 2009 Link to this post

    Yes.. that will work.. thanks...

    What is the purpose of IsHitTestVisible ?
  7. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 27 Nov 2009 Link to this post

    Hello Jon,

    In two words, when you set IsHitTestVisible to false, the mouse related events are not received by the control. For example, the control does not receive notification that the mouse is moved or clicked. Find more information on this matter here.

    Hope this helps. Get in touch with us should you need more support.

    Sincerely yours,
    Teodor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Hugo Aristizabal
    Hugo Aristizabal avatar
    22 posts
    Member since:
    Jan 2010

    Posted 18 Jan 2010 Link to this post

    Hi. You say that with IsHitTestVisible set to false, the control will not respond to mouse events. But can the user still select a value with the keyboard (pressing tab until focusing in the ComboBox) and then pressing the Down key?

    Thanks.
  9. Hugo Aristizabal
    Hugo Aristizabal avatar
    22 posts
    Member since:
    Jan 2010

    Posted 18 Jan 2010 Link to this post

    Well, I actually tried it, and the user could still select a valur with the keyboard. What I did was set the IsTabStop property to false as well, and it worked.
  10. HARI
    HARI avatar
    2 posts
    Member since:
    Aug 2015

    Posted 04 Jul Link to this post

    HI All,

    i have similar requirement . i am using RadComboBox and inside using checkbox.

    when checkboxes are selected then cheboxes selected value need to display in combobox. it is displaying currently . but when we move next control then selected value not displaying. Please help on this.

     

     <telerik:RadComboBox HorizontalAlignment="Left" 
                                                         x:Name="cmbCategory"
                                                         Width="350" 
                                                         ItemsSource="{Binding ProcessNames,Mode=TwoWay}" Text="{Binding SelectedProcessName,Mode=TwoWay}" IsEditable="True" IsReadOnly ="True"
                                                         Grid.Column="1" >
                                                    <telerik:RadComboBox.ItemTemplate>
                                                        <DataTemplate>
                                                            <StackPanel Orientation="Horizontal">
                                                                <CheckBox Name="BusinessProcessName" Content="{Binding CheckProcessNames,Mode=TwoWay}"  IsChecked="{Binding IsSelected,Mode=TwoWay}">
                                                                  
                                                                </CheckBox>
                                                               </StackPanel>
                                                        </DataTemplate>
                                                        
                                                    </telerik:RadComboBox.ItemTemplate>
  11. HARI
    HARI avatar
    2 posts
    Member since:
    Aug 2015

    Posted 04 Jul Link to this post

    HI All,

    i have similar requirement . i am using RadComboBox and inside using checkbox.

    when checkboxes are selected then cheboxes selected value need to display in combobox. it is displaying currently . but when we move next control then selected value not displaying. Please help on this.

  12. Polya
    Admin
    Polya avatar
    200 posts

    Posted 07 Jul Link to this post

    Hi Hari,

    You can use the TextSearch.TextPath property of the RadComboBox which will display the chosen property of the SelectedItem in the text box. That said, you should change the SelectedItem when the IsSelected property changes and add this in the RadComboBox:

    TextSearch.TextPath="CheckProcessNames"

    Hope this helps.

    Regards,

    Polya
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready