Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Display usercontrol in ultralistviews maincolumn
posted

Hi,

 I have a usercontrol with 2 labels arranged horizontally next to each other . the rightmost label's autosize property is set to true.

I assign the usercontrol to the ultralistviews maincolumn as below :

 

 

 

 

 

 

 

 

 

 

UserControl colitem = new UserControl();

 

 

 

 

 

 

UltraControlContainerEditor controlContainerEditor = new UltraControlContainerEditor();

 

 

 

controlContainerEditor.RenderingControl = colitem;

 

 

 

controlContainerEditor.RenderingControlPropertyName =

 

"SetValue";

 

 

 

 

 

 

ultralistview.MainColumn.EditorComponent = controlContainerEditor

 

When i do this, the text in the rightmost label is truncated.it dosent autosize according to the text in the ultralabel.  I tried resizing the maincolumn at runtime,but that didnt help either

my ultralistviews viewtype is set to list and for my feature I need this to be set to list.

can somebody help me with this issue.

THanks in advance

 

 

Parents
No Data
Reply
  • 53790
    posted

    Hello Tara,

    I try to reproduce your issue in attached sample, but without success. I`m using version 11.2 with latest available service release. Could you please take a look at the attached sample and please feel free to modify this sample to reproduce your issue and revert it back to me. I`ll be glad to research it. Also please tell me what is your current version and do you have any installed service release and which one.

    Let me know if you have any questions.

    Regards

    UltraListViewWithUserControl.zip
Children
  • 120
    posted in reply to Georgi

     

    Hi Georgi,

      Thank you for the quick response. I have modified your sample to reproduce my issue . I have modified the text of ultralabel2 to get a truncated text . I have set the TextHAlign property of ultralabel2 to Left .

    In addition to this I have also set the autosize property to true for ultralabel1 as well. I have set the TextHAlign property of ultralabel1 to Right . If I have long text in ultralabel1 even this is truncated.

    Ideally I want label1 to be autosized and right aligned and label2 autosized and left aligned.

    We are currently using version "11.2.20112.1010". of UltraWinListView.

    Thanks