Render list to grid cell

  1. #1

    Render list to grid cell


    Can you suggest me, how render data from list of objects into cell and every list item should be as separate element (label, for exapmle)?

    DataIndex of column is "TestList".
    TestList is a list of "TestObject"
    TestObject has properties: id, type and name.
  2. #2
    Hello @BogDan!

    Here's an example of a Grid Panel filled with a List of objects in our examples explorer:

    - Grid Panel > Miscellaneous > Generic List

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    @fabricio, thank you for your reply, but i need to render list to 1 cell of grid, not to whole grid.
    as a solution i tried to use componentColumn and Multiselect as it`s component:
        .DataIndex("List") //it is list of values, whitch i want to use as multiselect items
                        X.ListItem().Text("Item 1").Value("1"),
                        X.ListItem().Text("Item 2").Value("2"),
                        X.ListItem().Text("Item 3").Value("3"),
                        X.ListItem().Text("Item 4").Value("4"),
                        X.ListItem().Text("Item 5").Value("5")
    but i don`t understand, how to use elements from dataindex of my component column as items of multiselect component.

    Becides, i want customise standart list of multiselect, how can i use Tpl or something similar?
    I couldn`t find such exapmles on site.
  4. #4
    Hello again, @Bogdan!

    I am afraid I will reply you with another example, and I am pretty confident it will get you just a notch away from attaining your objective.

    - Editor Field Mapping

    The change it would have from what you need, I suppose, is just instead of returning a single item in the renderer, it would return an array of items for the multi-combo.

    Hope this helps!
    Last edited by fabricio.murta; Nov 17, 2018 at 3:43 AM. Reason: ops! not localhost example's url!
  5. #5
    Hi, @fabricio.

    I`ll describe my problem in more detail: i need to present list of objects in cell of gridpanel as blocks.
    Click image for larger version. 

Name:	ex.png 
Views:	1 
Size:	5.9 KB 
ID:	25196
    Next i need to release opportunity to select one ore more of this blocks in one row and drag&drop them to other row.

    I have two options for release it. First, i tried to do this with dataView component and my own html-template for blocks in cell. it looked like i needed, but i don`t know, how implement multiselection and drag&drop of this blocks.
    Second, i tried to do this with component column and multiselect component. In such implementation multiselect and drag&drop work well, but i don`t know, how to use own template for list of items inside multiselect component and how to attach data from ComponentColumn - DataIndex to multiselect items.

Similar Threads

  1. [CLOSED] Render Bar chart inside grid cell using column renderer
    By Sowjanya in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 28, 2014, 5:14 PM
  2. Replies: 2
    Last Post: Mar 04, 2013, 12:47 PM
  3. [CLOSED] Grid Render Cell is empty
    By sharif in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 28, 2010, 2:19 AM
  4. [CLOSED] Render (or prepare) grid cell
    By GmServizi in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 24, 2009, 7:54 AM
  5. Replies: 2
    Last Post: Feb 19, 2009, 2:02 PM

Posting Permissions