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
35
EditorComponent in cell showing only when mouse is over.
posted

on InitializeRowEvent I assign UltraControlContainerEditor to EditorComponent of cell. its added successfully. but the problem is that control show only when we mouse over it or click on sell. 

e.g dropdown or any control . 

i am adding in following way . 

UltraControlContainerEditor uce= new UltraControlContainerEditor();

  Infragistics.Win.UltraWinEditors.UltraComboEditor cmb = new Infragistics.Win.UltraWinEditors.UltraComboEditor();

  cmb.Items.Add(lstItem);

 cmb.DropDownStyle = DropDownStyle.DropDownList;

 uce.EditingControl = (Control)cmb

 e.Row.Cells["Answer"].EditorComponent = uce;

Parents
No Data
Reply
  • 469350
    Offline posted

    What kind of UI are you trying to acheive here? 

    In your original post, you were just setting the EditingControl to an UltraComboEditor, but that doesn't really make sense, since UltraComboEditor is already an editor. If you just want a dropdown list like an UltraComboEditor in a cell, then you do not need UltraControlContainerEditor, you can use a ValueList. 

    In your subsequent post, you are creating the UltraComboEditor and binding the list and also setting a bunch of properties on it, but many of those properties are irrelevant to the grid, like the Tag. 

    I think you might be making things a lot more complicated than they need to be. Maybe what you want here is to either assign the UltraComboEditor directly to the cell: 

    Dim uce as UltraComboEditor = CreateMOList(e.Row.Cells["CarePlanQuestionId"].Value.ToSafeString(), out hasChildCarePlan, "MO", out NumberOfChildCarePlans);

    e.Row.Cells["Answer"].EditorComponent = uce

    Or perhaps even just creating a BindableValueList and binding it to the data you want. 

    You only need UltraControlContainerEditor if you want to embed a UserControl or something complicated like that. You do not need it if you just need a dropdown list in the column or if you are doing something that can be achieved by any of the existing editors. 

Children