重点如下:
1
<
AjaxEvents
>
2
<
Click
OnEvent
="PanelTree_Click"
>
3
<
EventMask
ShowMask
="true"
Msg
="正在执行,请稍后"
/>
4
<
ExtraParams
>
5
<
ext:Parameter
Name
="Id"
Value
="node.id"
Mode
="Raw"
></
ext:Parameter
>
6
</
ExtraParams
>
7
</
Click
>
8
</
AjaxEvents
>

2

3

4

5

6

7

8

<ext:Parameter Name="Id" Value="node.id" Mode="Raw"></ext:Parameter>
这边value="node.id"就可以了,模式一定要改为Raw
1
[AjaxMethod]
2
protected
void
PanelTree_Click(
object
sender,AjaxEventArgs e)
3
{
4
string str = e.ExtraParams["Id"];
5
if (string.IsNullOrEmpty(str) || str=="root")
6
{
7
BuildDataTable();
8
}
9
else
10
{
11
BuildDataTable(int.SafeParse(str));
12
}
13
}

2

3


4

5

6


7

8

9

10


11

12

13

原文:http://hi.baidu.com/haofz1983/blog/item/f2fd680914320d2d6a60fb5a.html