access Custom item to fill data CustomDetailListViewDataCellElement

4 posts, 1 answers
  1. M
    M avatar
    4 posts
    Member since:
    Feb 2017

    Posted 05 Feb Link to this post

    Hi

     

    I implemented  a (custom item - radListview) in a Listview using CustomDetailListViewDataCellElement

    the view type of the parent ListView is Detailview and a data set is bounded to it

    I want to fill the custom listview inside the parent listview with data

    I can fill it with data at creation time

    but after the cell has been created  , I can't

     

    I don't know how to reach it

  2. Dimitar
    Admin
    Dimitar avatar
    1877 posts

    Posted 06 Feb Link to this post

    Hello M,

    I am not sure what exactly you want to achieve. Could you please elaborate?

    In general, when the control is bound it will reflect the changes automatically. When using custom items you need to use the Syncronize method to update the items. An example is available here: Custom items

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. M
    M avatar
    4 posts
    Member since:
    Feb 2017

    Posted 11 Feb in reply to Dimitar Link to this post

    Hi again

    I wanted to set different items for each customDetailviewdatacell

    which are RadListviewElemant s in my case .

    However I maged to achive this by the following code in radListView1_CellCreating event :

    var lv= e.CellElement.ChildrenHierarchy.FirstOrDefault(c => c.Name == "123");
    if (lv is RadListViewElement)
    {
    ((RadListViewElement)cb).Items.Add("item a");
    }

     

    Or by defining a public property in CustomDetailListViewDataCellElement and access it in Cell_Creating event

    for ecample seting datasource of the child Listview

     

    Now I'm facing another problem 

    I don't know how to synchronize properties for a listview as a CustomDetailListViewDataCellElement  in Synchronize()

    so as the result of that  when I scroll verticaly , my child listviews items change 

    and I took care of IsCompatible for both custom cells and normal cells

     

    Before scrolling :

    1st row child listview items --> 1 , 2 , 3

    2end row child listview items --> 7 , 8 , 9

    and so on

     

    After scrolling :

    1st row child listview items --> 7 , 8 , 9
    2end row child listview items --> 1 , 2 , 3
    and so on

     

    I will open a new thread for this problem

  4. Answer
    Dimitar
    Admin
    Dimitar avatar
    1877 posts

    Posted 14 Feb Link to this post

    Hi M,

    This is exactly why I have suggested the Synchronize method. The cell elements are reused and when this is done their content needs to be synchronized. 

    We can continue to discuss this in the other thread that you have opened.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top