RadDataEntry

1 Answer 66 Views
DataEntry
Patgat
Top achievements
Rank 2
Iron
Iron
Iron
Patgat asked on 24 Aug 2023, 09:30 PM

hi all,

I am trying to set some RadDataEntry RadTextBox as ReadOnly, as shown in the following link 

https://www.telerik.com/forums/raddataentry-controls-readonly

Here is my code :

    private void rdeDynamicInput_ItemInitialized(object sender, ItemInitializedEventArgs e)
    {
            if (e.Panel.Controls[0].GetType().ToString() == "Telerik.WinControls.UI.RadCheckBox" ||
                e.Panel.Controls[0].GetType().ToString() == "Telerik.WinControls.UI.RadTextBox")
                  {
                   ((RadTextBox)e.Panel.Controls[0]).ReadOnly = true;
                  }
    }
This code seems to work and checking the control after the instruction shows the attribute set to true, but the display doesn't change and the control stay writable.

 

Thanks for your help

Best

Patrick

1 Answer, 1 is accepted

Sort by
0
Patgat
Top achievements
Rank 2
Iron
Iron
Iron
answered on 24 Aug 2023, 09:58 PM

Sorry all,

This works fine. I wasn't looking at the right control

Again my apologies

P.

Tags
DataEntry
Asked by
Patgat
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Patgat
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or