Devexpress MVC Gridview
1. 根据选中的KeyValue 来获取其他field的value // Gridview settings settings.CustomJSProperties = (s, e) => { Dictionary<object, int> visibleIndices = new Dictionary<object, int>(); for (int i = 0; i < ((MVCxGridView)s).VisibleRowCount; i++) visibleIndices.Add(((MVCxGridView)s).GetRowValues(i, ((MVCxGridView)s).KeyFieldName), i); e.Properties["cpIndices"] = visibleIndices; }; //javascript调用 GridView.cpIndices[Key,"fieldName") 2. 根据某些field的value来改变cell的backcolor //Gridview settings settings.HtmlDataCellPrepared = (sender, e) => { var gv = sender as MVCxGridView; string ls_Status = gv.GetRowValues(e