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
885
Removing Cell/DropDownList
posted

Hi,

In my grid I should dynamically add remove etc dropdowns in some grid cells. Somehow if I call existing Remove method for ValueLists object it doesn't remove dropdown from cell. No error but dropdown still in place. Clear method just removing items, however dropdown style still there in cell.  

Any better way you might suggest? Thanks!

 

Example:

Me

 

 

.grdIgstcs.DisplayLayout.ValueLists.Remove(Key)

 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    The ValueLists collection on the layout is just a convenient place to store ValueLists. Removing items from that collection does not dispose the ValueList or remove it from any cells or columns it may be applied to.

    In fact, you don't have to add a ValueList to the collection in order to use it in the grid. You can declare a ValueList in code and use it directly.

    If you are setting a ValueList on a cell or a column, then the only way to remove it is to set the ValueList property on the cell or column to null.

    It's typically a good idea to set the ValueList property of a cell inside the InitializeRow event. That way if some value in the row changes that needs to change the ValueList, the event will fire and handle it automatically.

Children