Coolite GridPanel 操作之一:获取gridpanel 选中行的记录信息
2010-08-11 14:53
316 查看
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();
}
}
}
转自 /article/7006096.html
相关文章推荐
- Coolite GridPanel 操作之一:获取gridpanel 选中行的记录信息
- Extjs gridPanel对选中行的操作
- Extjs gridPanel对选中行的操作
- [Extjs6]获取gridpanel内选中的数据
- ext的grid中如果对一条记录进行更新操作,grid选中项不会改变解决方案
- 获取UltraWebGrid选中行的信息
- ExtJs——获取GridPanel中的行数据的详细信息
- ExtJs学习笔记(7)_获取GridPanel选中行的详细信息 (转)
- ExtJs学习笔记(7)_获取GridPanel选中行的详细信息
- ExtJS4获取控件展示的信息---获取grid选中项信息
- ExtJs学习笔记(7)_获取GridPanel选中行的详细信息
- Coolite:GridPanel按SHIFT、Ctrl多行跳行选择,获取所选行主键及RowIndex
- ExtJs之GridPanel综合操作(一)——异步获取Json数据并显示
- [Extjs6] Ext.data.Store Gridpanel默认选中一些记录
- Ext.grid.EditorGridPanel的使用、修改记录的获取及提交方法
- Extjs获取GridPanel选中行的信息
- Extjs gridPanel对选中行的操作
- [Extjs6]获取gridpanel内选中的数据
- Ext.grid.EditorGridPanel的使用、修改记录的获取及提交
- Ext:gridPanel 在js中实现获取选中一行/多行的某列值