MVC Gridview排序箭头改变颜色

时间:2016-04-22 20:21:53

标签: html css asp.net-mvc gridview devexpress

在MVCxGridView中,如何更改在标题右侧按升序/降序排序的小箭头的颜色?

http://demos.devexpress.com/MVCxGridViewDemos/GroupingSorting/Sorting

1 个答案:

答案 0 :(得分:0)

看起来这似乎很容易改变,因为箭头本身实际上是<img>个元素,指向由正在使用的主题定义的精灵:

.literally-tons-of-other-styles-here,
.dxGridView_gvDetailExpandedButton_Metropolis, 
.dxgvFocusedRow_Metropolis .dxGridView_gvDetailExpandedButtonRtl_Metropolis{
    background-image: url('/MVCxGridViewDemos/DXR.axd?r=0_1659-NDGyc');
    background-repeat: no-repeat;
    background-color: transparent;
}

您需要通过使用自己的图片并定位正确的样式来明确覆盖它,或者使用以下内容确定是否有更适合您需求的其他主题:

.dxGridView_gvHeaderSortUp_Metropolis {
     background-image: url('your-custom-arrow-url-here')!important;
}