PDA

View Full Version : [CLOSED] in the RowExpander of gridpanel paging can not refresh??



tobros
Oct 22, 2013, 8:27 AM
[DirectMethod]
public string GetGrid(Dictionary<string, string> parameters)
{
string Month = parameters["Month"];

GridPanel grid = new GridPanel
{
EnableColumnHide = false,
AutoScroll = true,
StyleSpec = "border:solid 2px #3892D3",
SortableColumns = false,
Height = 370,
Store ={
new Store{
ID="store_"+parameters["Month"],
Model={
new Model{
IDProperty="VouchId",
Fields={
new ModelField("Month"),
new ModelField("VouchNo"),
new ModelField("Digest"),
new ModelField("Yedj"),
new ModelField("Yehl"),
new ModelField("Jfsl"),
new ModelField("Jfwb"),
new ModelField("Jfje"),
new ModelField("Dfsl"),
new ModelField("Dfwb"),
new ModelField("Dfje"),
new ModelField("Direction"),
new ModelField("Yesl"),
new ModelField("Yewb"),
new ModelField("Yeje"),
new ModelField("Yedj"),
new ModelField("Yehl")
}
}
},
DataSource=zflzmxzBLL.Get_ZflzMxz_Ccode(2002,int.P arse(Month),int.Parse(Month),int.Parse(Month),hide AccCode.Value.ToString(),true,50,false,true),
PageSize=10,
Listeners={
Load={Handler = "if(App.Day != null) controlMxzgs(App.cbxZygs);"},
}
}


7085

how to refresh in bgCode????

Daniil
Oct 22, 2013, 1:16 PM
Hi @tobros,

A PagingToolbar's refresh button doesn't work with a Store without a Proxy.

In your case you can a Store's ServerProxy with a PageProxy's DirectFn.

Example

<ext:Store runat="server" PageSize="3">
<ServerProxy>
<ext:PageProxy DirectFn="App.direct.BindData" />
</ServerProxy>
</ext:Store>

[DirectMethod]
public static object BindData()
{
return new object[]
{
new object[] { "field 1", "field 2" },
new object[] { "field 1", "field 2" }
};
}

tobros
Oct 23, 2013, 4:07 AM
I mean how wo write code in bgCode???? in the bgCode GetGrid method, how to write "onReadData" event???

Another problem is how to load content in GridPanel displays "Loading"??? I try to use
<View>
<ext:GridView LoadMask="true"></ext:GridView>
</View>
unfortunately ! It is not display "loading..." !!!!

Daniil
Oct 23, 2013, 6:16 AM
I mean how wo write code in bgCode???? in the bgCode GetGrid method, how to write "onReadData" event???

Example

store.ReadData += Store_ReadDataHander;



Another problem is how to load content in GridPanel displays "Loading"??? I try to use
<View>
<ext:GridView LoadMask="true"></ext:GridView>
</View>
unfortunately ! It is not display "loading..." !!!!

It works for remote load requests only. It doesn't show a mask for a Store's DataSource.

tobros
Oct 25, 2013, 4:41 AM

Daniil
Oct 25, 2013, 7:57 AM
It should be done this way:

AjaxProxy proxy = new AjaxProxy();
proxy.Url = "url";
proxy.ActionMethods.Read = HttpMethod.GET;
proxy.Reader.Add(new JsonReader()
{
Root = "data"
});

tobros
Oct 25, 2013, 9:30 AM
oh , It's work!! Thankyou!!