Render list to grid cell

  1. #1

    Render list to grid cell

    Hi!

    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:
    X.ComponentColumn()
        .Selectable(false)
        .DataIndex("List") //it is list of values, whitch i want to use as multiselect items
        .Component(
            X.MultiSelect()
                .DragGroup("grp2")
                .DropGroup("grp2")
                .MultiSelect(true)
                    .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 ext.net 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; Yesterday at 4:43 AM. Reason: ops! not localhost example's url!

Similar Threads

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

Posting Permissions