Coolite GridPanel 操作之一:获取gridpanel 选中行的记录信息
来源:互联网 发布:nodejs部署到windows 编辑:程序博客网 时间:2024/05/22 13:47
Coolite GridPanel 操作之一:获取gridpanel 选中行的记录信息
<Buttons>
<ext:Button ID="ButtonSelect" runat="server" Text="Select">
<AjaxEvents>
<Click OnEvent="ButtonRoleListSelect_Click">
<ExtraParams>
<ext:Parameter Name="Values" Value="Ext.encode(#{GropRoleList}.getRowsValues())"
Mode="Raw" />
</ExtraParams>
</Click>
</AjaxEvents>
</ext:Button>
</Buttons>
事件:
public void ButtonRoleListSelect_Click(object sender, AjaxEventArgs e)
{
string json = e.ExtraParams["Values"];
bool addHeader = true;
DataTable dt = new DataTable();
StringBuilder sbstr = new StringBuilder();
Dictionary<string, string>[] companies = JSON.Deserialize<Dictionary<string, string>[]>(json);
foreach (Dictionary<string, string> row in companies)
{
if (addHeader)
{
foreach (KeyValuePair<string, string> keyValuePair in row)
{
dt.Columns.Add(keyValuePair.Key);
}
}
addHeader = false;
ArrayList list = new ArrayList();
DataRow dr = dt.NewRow();
foreach (KeyValuePair<string, string> keyValuePair in row)
{
dr[keyValuePair.Key] = keyValuePair.Value;
if (dr["orgrole_id"] == dr[keyValuePair.Key])
{
sbstr.Append(keyValuePair.Value + ";");
}
}
dt.Rows.Add(dr);
}
if (dt.Rows.Count > 0)
{
try
{
DC_OperationType operationtype = new DC_OperationType();
MSG_OrgRoleOrgMainTainRequest request = new MSG_OrgRoleOrgMainTainRequest();
request.orgrole_id = sbstr.ToString();
operationtype.DCE_OperationType = DCE_OperationType.Add;
request.OperationType = operationtype;
request.organization_id = Node_id;
client.OrgRoleOrgMaintain(request);
string JsFunction = "refreshTree(#{TreePanelOrganization})";
//string JsFunction = "alert('dd');";
//string JsFunction = "refreshTree()";
Coolite.Ext.Web.ScriptManager sm = Coolite.Ext.Web.ScriptManager.GetInstance(HttpContext.Current);
sm.AddScript(string.Format("{0};", JsFunction));
this.WindowNewRole.Hide();
}
catch (Exception ex)
{
Ext.Msg.Alert("错误", "Message: " + ex.Message + ";").Show();
}
}
}
转自 http://www.cnblogs.com/KingStar/archive/2010/06/08/1753946.html
- Coolite GridPanel 操作之一:获取gridpanel 选中行的记录信息
- Extjs gridPanel对选中行的操作
- Extjs gridPanel对选中行的操作
- Extjs gridPanel对选中行的操作
- Extjs gridPanel对选中行的操作
- Coolite 中前台获取 GridPanel 当前选择行值的代码
- [Extjs6]获取gridpanel内选中的数据
- GridPanel去掉选中行的选中状态
- 自定义Ext/Coolite的GridPanel的交替行颜色
- 自定义Ext/Coolite的GridPanel的交替行颜色
- extjs gridpanel 操作行 得到选中行
- Coolite GridPanel导出 Excel
- gridpanel select选中行方法
- 为GridPanel默认选中行
- Ext.Net 后台获取GridPanel当前选中行
- coolite 中GridPanel 右键菜单
- coolite 中GridPanel 导出excel
- ExtJs学习笔记(7)_获取GridPanel选中行的详细信息
- java对汉字的读取
- Android Layout之二:LinearLayout
- Application Pool 与 AppDomain 区别
- REPLACE
- org.apache.axis2.AxisFault: For input string:(Axis2)
- Coolite GridPanel 操作之一:获取gridpanel 选中行的记录信息
- 8/11
- 系统配置文件介绍
- 从远方赶回
- baidu hi在ubuntu上的安装(接近完美)
- arise your window step by step
- 自定义控件-----ReflectionImage
- mysql用户权限管理(Grant,Revoke)
- 长连接VS短连接