小编Had*_*das的帖子

带有extjs 4的嵌套网格

我可以把网格放在另一个网格的插件中.

这是我的网格,我想放入配置'插件'的ext网格.

 var grid = new Ext.grid.GridPanel({
                    store: store,
                    columns: [
        { header: 'Customer Name', dataIndex: 'CustomerName', width: 212 },
        { header: 'Charge Date', dataIndex: 'ChargeDate', width: 212 },
        { header: 'Package Plan', dataIndex: 'PackagePlan', width: 212 },
        { header: 'Current Invoice Sum', dataIndex: 'CurrentInvoiceSum', width: 212 }
     ],
                    plugins: [{
                        ptype: 'rowexpander',
                        rowBodyTpl: ['<div style="background-color:#CBDDF3; width:643px;margin-left:147px;margin-bottom: 20px;border: 1px solid;">',
            '<p><b>Customer Details:</b><br/>{CustomerName}<br/> {CustomerAddress}, {CustomerPhone}, {CustomerEmail} </p>',
                                '<p><b>Package Type:</b> {PackagePlan}<br/>',
                                '<b>Invoice Details:</b></p>',
                   '<div class="nestedO" id="{InvoiceId}"></div> </div>',
        ]
                    }],
                    width: 900,
                    height: …
Run Code Online (Sandbox Code Playgroud)

extjs4

3
推荐指数
1
解决办法
5723
查看次数

从外部的Ext.data.Store获取JSON数组?

如何在函数外部从Ext.data.Store获取JSON数组?代码:

var store = new Ext.data.Store({
                model: 'nested' + type,
                proxy: {
                    type: 'ajax',
                    url: '/Grid/GetDetailed?InvoiceId=' + $(row).attr('id'),
                    reader: {
                        type: 'json',
                        root: 'items',
                        totalProperty: 'totalCount'
                    }
                }
            });
            store.load();
Run Code Online (Sandbox Code Playgroud)

我想使用这样的东西:

store.getAt(0);
Run Code Online (Sandbox Code Playgroud)

但它没有定义.有人说它是异步的ajax的beacaouse.

grid extjs

2
推荐指数
1
解决办法
2637
查看次数

将存储过程结果转换为模型对象

我有一个存储过程在我的asp.net mvc3应用程序中使用Entity Framework:

CREATE PROCEDURE dbo.MinMax
AS

DECLARE @T1 TABLE(MinColorsId int,MAXColorsId int)
INSERT @T1 
select MIN(ColorsId) as MinColorsId,MAX(ColorsId) as MAXColorsId
from DiamondInfoes 
SELECT * FROM @T1
RETURN
Run Code Online (Sandbox Code Playgroud)

在我的模型中,我有与过程表结果相同的属性名称:

public class colorModel
{
    [Display(Name = "MinColorsId")]
    public float MinColorsId { get; set; }

    [Display(Name = "MaxColorsId")]
    public float MaxColorsId { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

在控制器中我运行存储过程:

private _ModelContainer m_db = new _ModelContainer();
var minmax = m_db.MinMax();
Run Code Online (Sandbox Code Playgroud)

我想设置包含程序结果colorModelminmax那个?(简而言之,我有很多属性...)

c# sql entity-framework entity-framework-4

2
推荐指数
1
解决办法
4173
查看次数

标签 统计

c# ×1

entity-framework ×1

entity-framework-4 ×1

extjs ×1

extjs4 ×1

grid ×1

sql ×1