PDA

View Full Version : [CLOSED] create gridpanel in code behind?



tobros
Oct 28, 2013, 9:04 AM
var grid = new GridPanel
{
Store =
{
new Store
{
Model = {
new Model {
IDProperty = "vouchId",
Fields =
{
new ModelField("vouchId"),
new ModelField("pzzh")
}
}
},
DataSource = data1
}
},
ColumnModel =
{
Columns =
{
new Column { Text = "凭证字号", DataIndex = "pzzh" }
}
},
Plugins =
{
new RowExpander
{
Loader =
{
DirectMethod = "#{DirectMethods}.GetGrid1" ,
LoadMask=
{
ShowMask = true
},
Params=
{
new Ext.Net.Parameter
{
Name = "vouchId",
Value = "this.record.data.vouchId",
Mode = ParameterMode.Raw
}
}
}

}
}
};

i doubt code's format is wrong , because ctrl+e+d can't format the source code.

Daniil
Oct 28, 2013, 1:27 PM
Hi @tobros,


i doubt code's format is wrong , because ctrl+e+d can't format the source code.

Yes, seems VS cannot format it well in such cases.

Please replace

Loader =
with

Loader = new ComponentLoader()