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

佐手、 提交于 2019-12-24 16:13:46

问题


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>


来源:https://stackoverflow.com/questions/15413845/ext-net-how-can-i-use-more-than-data-index-on-a-same-column

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!