ext.net 1 - How to construct div element ID based on the row data in code behind

76 views Asked by At

I am looking for a solution to construct div element ID based on the row data.

For instance, I have a row expander component for each row in a grid. Each row expander has a template

Template = { Html = "<div id=\"subgrid\"></div>" },

But I want the div to have unique id for each row so that I can access the specific div in Javascript. How can I achieve that?

Thanks in advance.

1

There are 1 answers

0
Fabio Barros On BEST ANSWER

Just use template like this:

    plugins: [
        {
            ptype: 'rowexpander',
            rowBodyTpl: [
                '<div id="MyUniqueId_{MyDataColumn1}"></div>'
            ]
        }
    ]