使用asp.net Web应用程序更改颜色jqgrid行onClick和悬停(mouceover) [英] change colors jqgrid row onClick and on hover(mouceover) using asp.net web application

查看:88
本文介绍了使用asp.net Web应用程序更改颜色jqgrid行onClick和悬停(mouceover)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在rowSelect上改变我的jqGrid的颜色(使用我的自定义颜色)。

如何在行突出显示时更改jqgrid的颜色,为此一个我很困惑如何开始。



i尝试了行选择的代码。



Hi,
I wanted to change color of my jqGrid on rowSelect(with my custom colors).
How to change color of jqgrid on row highlighting , for this one i am getting confusion how to start.

i tried thid code for row select.

onSelectRow: function(id){
    var rowData = $(this).getRowData(id);
   // if(id!==lastSel){
          $(this).find('.ui-state-highlight').css({background:'#80BFFF'});
          lastSel=id;
     //}
 },







if i点击row1突出显示然后我点击row2它也突出显示。

然后如何改变特定行onSelectRow的颜色并悬停。

如果我想获得lastSel价值我收到错误。

还有其他选择吗?




if i click on row1 its highlighting then i click row2 its also highlighting.
then how to change color of specific row onSelectRow and hover.
if i am trying to get "lastSel" value i am getting error.
Is there any alternative to do this?

推荐答案

(this).getRowData(id);
// if(id!== lastSel){
(this).getRowData(id); // if(id!==lastSel){


(this).find('。ui-state-highlight')。css({background:'#80BFFF });
lastSel = id;
//}
},
(this).find('.ui-state-highlight').css({background:'#80BFFF'}); lastSel=id; //} },







if i点击row1突出显示然后我点击row2它也突出显示。

然后如何改变特定行onSelectRow的颜色并悬停。

如果我想获得lastSel价值我收到错误。

还有其他选择吗?




if i click on row1 its highlighting then i click row2 its also highlighting.
then how to change color of specific row onSelectRow and hover.
if i am trying to get "lastSel" value i am getting error.
Is there any alternative to do this?


第一个问题: 改变颜色网格onClick。





First problem: Change the color of the grid onClick.


onSelectRow: function() {
      //HERE PUT THE DEFAULT COLOR (I PRESUME THAT IS WHITE)
      //YOU SHOULD SELECT BY JQUERY ALL ROWS


这篇关于使用asp.net Web应用程序更改颜色jqgrid行onClick和悬停(mouceover)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆