FineUI 官方论坛
标题:
【已确认+非BUG】合计行 空白 4.11空项目搭建
[打印本页]
作者:
jmoney
时间:
2014-8-21 10:43
标题:
【已确认+非BUG】合计行 空白 4.11空项目搭建
三石大大: 请帮忙看下合计行问题
测试环境:
http://fineui.com/bbs/forum.php? ... 2123&extra=page%3D1
下载的
EmptyProjectNet40_FineUI_v4.1.1.zip
包。
web代码:
<f:PageManager ID="PageManager1" runat="server" />
<f:Grid ID="Grid1" runat="server" AllowSorting="True" Title="Grid" <font color="#ff0000">EnableSummary ="true" SummaryPosition ="Top" </font> >
<Columns>
<f:BoundField DataField ="Name" SortField ="Name" ID ="Name" HeaderText ="Name"/>
<f:BoundField DataField ="BlogId" SortField ="BlogId" ID ="BlogId" HeaderText ="BlogId"/>
</Columns>
</f:Grid>
复制代码
CS代码:
using (var db = new BlogContext())
{
var query = from b in db.Blogs
orderby b.Name
select b;
Grid1.RecordCount = 20;
Grid1.DataSource = query;
Grid1.DataBind();
<font color="#ff0000"> JObject summary = new JObject();
summary.Add("BlogId", 100);
summary.Add("Name", "合计");
Grid1.SummaryData = summary;</font>
}
复制代码
查看源文件:
<script type="text/javascript">
//<![CDATA[
if(!F&&!Ext){if(confirm('ERROR: extjs folder is lost, download it now?')){window.location.href='http://fineui.com/bbs/forum.php?mod=viewthread&tid=3218';}}Ext.onReady(function(){F.util.init('side',100,':','/extjs/res/s.gif',true,'default',true,'neptune');F.pagemanager={name:"
ageManager1"};var f2={f_state:{},id:"Grid1_Name",text:"Name",sortable:true,dataIndex:"Grid1_Name",f_columnIndex:0,menuDisabled:false,hideable:true,summaryType:F.util.summaryType('Grid1')};var f3={f_state:{},id:"Grid1_BlogId",text:"BlogId",sortable:true,dataIndex:"Grid1_BlogId",f_columnIndex:1,menuDisabled:false,hideable:true,summaryType:F.util.summaryType('Grid1')};var f1_state={"RecordCount":6,"SummaryData":{"BlogId":100,"Name":"合计"},"F_Rows":{"Values":[["jim","1"],["jim","3"],["jim","5"],["rainbow","6"],["rainbow","4"],["rainbow","2"]],"DataKeys":[[null],[null],[null],[null],[null],[null]],"States":[[],[],[],[],[],[]]}};var f1_selModel=Ext.create('Ext.selection.RowModel',{mode:"MULTI"});var f1_fields=[{name:"Grid1_Name"},{name:"Grid1_BlogId"}];var f1_store=Ext.create('Ext.data.ArrayStore',{fields:f1_fields,remoteSort:true,listeners:{beforeload:function(store,operation){var sorter=operation.sorters[0];if(sorter){__doPostBack('Grid1','Sort$'+sorter.property+'$'+sorter.direction);}return false;}}});var f1_columns=[f2,f3];var f1=Ext.create('Ext.grid.Panel',{f_state:f1_state,id:"Grid1",renderTo:"Grid1_wrapper",bodyStyle:"",border:true,animCollapse:false,collapsible:false,collapsed:false,title:"Grid",selModel:f1_selModel,columns:f1_columns,store:f1_store,f_fields:f1_fields,viewConfig:{getRowClass:function(){return 'f-grid-row';}},draggable:false,enableColumnMove:false,enableDragDrop:false,features:[{ftype:"summary",id:"summary",dock:"top"}],enableLocking:false,listeners:{afterrender:function(cmp){window.setTimeout(function(){cmp.f_initSortHeaders();cmp.f_selectRows();},200);},render:function(cmp){cmp.f_loadData();}}});var f4=Ext.create('Ext.button.Button',{f_state:{},id:"btnHello",renderTo:"btnHello_wrapper",text:"点击弹出对话框",handler:function(){F.disable('btnHello');__doPostBack('btnHello','');}});F.util.removePageLoading(false);F.util.triggerReady();});//]]>
</script>
测试结果:
见BUG截图
附件太大,传到百度网盘:
http://pan.baidu.com/s/1pWmi
作者:
sanshi
时间:
2014-8-21 12:02
已经确认,列的 ID 换成 ColumnID 就行了。
<f:Grid ID="Grid1" runat="server" AllowSorting="True" Title="Grid" SummaryPosition="Top" EnableSummary="true">
<Columns>
<f:BoundField DataField="Name" SortField="Name" <b>ColumnID="Name"</b> HeaderText="Name" />
<f:BoundField DataField="BlogId" SortField="BlogId" <b>ColumnID="BlogId"</b> HeaderText="BlogId" />
</Columns>
</f:Grid>
复制代码
作者:
jmoney
时间:
2014-8-21 12:35
sanshi 发表于 2014-8-21 12:02
已经确认,列的 ID 换成 ColumnID 就行了。
谢谢三石大大,问题已解决。
之前不是专门做开发的,现在公司有需要,但是又不对外招开发人员,只能自己摸索,以后可能还要给三石大大添麻烦的。。。
作者:
sanshi
时间:
2014-8-21 13:31
有问题发空项目就好办,能方便的重现,也就能及时解决
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4