总结ASPxGridView的使用 - 图文

2026/1/17 0:05:57

------------------------ 内容: 一客户端常用 1.常用API:

PerformCallback(this.value); CollapseAll() ExpandAll() SelectRows() UnselectRows()

UnselectAllRowsOnPage() SelectAllRowsOnPage(this.checked)

2.聚焦行改变事件。向服务器查询聚焦行的 \和 \消息,并该消息将归来到 OnGetRowValues() 函数 function OnGridFocusedRowChanged() {

grid.GetRowValues(grid.GetFocusedRowIndex(),莱尔斯丹 'EmployeeID;Notes', OnGetRowValues); }

// 处理服务器端传回的数据(values是个数组,包括 \和 \值) function OnGetRowValues(values) {

DetailImage.SetImageUrl(\DetailNotes.SetText(values[1]); }

function grid_SelectionChanged(s, e) {

s.GetSelectedFieldValues(\}

function GetSelectedFieldValuesCallback(values) {

selList.BeginUpdate(); try {

selList.ClearItems();

for(var i = 0; i < values.length; i ++) { selList.AddItem(values[i]); } } finally {

selList.EndUpdate(); }

document.getElementByIdx_x(\}

function OnGridFocusedRowChanged() {

// Query the server for the \// The values will be returned to the OnGetRowValues() function

grid.GetRowValues(grid.GetFocusedRowIndex(), 'EmployeeID;Notes', OnGetRowValues); }

//Value array contains \function OnGetRowValues(values) {

var notes = document.getElementByIdx_x(\notes.value = values[1];

var image = document.getElementByIdx_x(\image.src = \}

5. 获得抉择的行数目 grid.GetSelectedRowCount()

6.单击行时,选中行 function OnRowClick(e) { //Clear the text selection _aspxClearSelection(); //Unselect all rows

grid._selectAllRowsOnPage(false); //Select the row

grid.SelectRow(e.visibleIndex, true); }

7.穿越checkbox 抉择行 设置GridView 的属性ShowSelectCheckBox =true function grid_SelectionChanged(s,e) {

s.GetSelectedFieldValues(\}

GetSelectedFieldValuesCallback 回调函数 function GetSelectedFieldValuesCallback(values) { selList.BeginUpdate(); try {

selList.ClearItems();

for(var i=0;i

selList.EndUpdate(); }

document.getElementByIdx_x(\}

selList 是ASPxListBox控件

8.抉择所有行: grid.SelectAllRowsOnPage(this.checked);

9.grid.StartEditRow(VisibleIndex) 启用编辑框,Container.VisibleIndex 获得行索引

<%#GetEditRowHtml(Container.VisibleIndex) %> GetEditRowHtml 为后台一个措施归来一个字符串

protected string GetEditRowHtml(int visibleIndex) {

string rowValue = Convert.ToString(grid.GetRowValues(visibleIndex,万宝龙 \string cbValue = Convert.ToString(cbCountries.Value); if(rowValue == cbValue)

return string.Format(\return \}

10.启用服务器端函数: _CustomerCallBack() PerformCallback(parameter) 二、客户端常用事件 1.


总结ASPxGridView的使用 - 图文.doc 将本文的Word文档下载到电脑
搜索更多关于: 总结ASPxGridView的使用 - 图文 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219