ext.net how can i use more than data_index on a sa

2019-08-03 18:58发布

问题:

i have the following :

<ext:RecordField Name="ID" />
                    <ext:RecordField Name="UserName" />
                    <ext:RecordField Name="FirstName" />
                     <ext:RecordField Name="LasttName" />
            i want use  FirstName& LasttName on : 

 <ext:Column ColumnID="Name" Sortable="false" DataIndex="????"
     Resizable="false" MenuDisabled="true"/>

What i need is to use more than data_index on a same Column is that possible, how can i achieve that? thanks in advance!

回答1:

Try something like this:

//In your head:

<script type="text/javascript">
var myRenderer = function(value, metadata, record) {
    return record.get('FirstName') + ' ' + record.get('LastName');
}
</script>


<ext:Column ColumnID="Name" Sortable="false" Resizable="false" MenuDisabled="true">
    <Renderer Fn="myRenderer" />
</ext:Column>


标签: Extjs ext.net