如何在Devex Pivot网格中从单元格对象中查找列,行和数据区域值

时间:2016-07-20 07:30:39

标签: c# winforms devexpress pivot devexpress-windows-ui

我正在使用Dev ex pivot grid在屏幕上显示一些数据。当用户点击数据区中的任何单元格时,我想找出它对应的行,列和数据区域值及其字段名称。

我正在处理devex pivot grid的CellClick事件。 使用PivotCellEventArgs对象我可以找到字段名但不能找到值。

我想从所有视角(行,列和数据区域)获取给定单元格的名称和值。

提前致谢。

1 个答案:

答案 0 :(得分:0)

在Razor MVC中,您可以这样做

import React from 'react'
import styled from 'styled-components';

function Video(){

   const data = {
       channel: 'Govana',
       name: 'Video Four',
       description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
   }

    return(
    <VideoWrapper>
        
        <Wrapper>
        </Wrapper>
    
        <Info>
            <Title>{data.name}</Title>
            <ChannelName>{data.channel}</ChannelName>
            <Description>{data.description}</Description>
        </Info>      
        
    </VideoWrapper>
    )
}

const Title = styled.h2`
    font-size: 1.5rem;
    font-weight: 700;
`

const Description = styled.p`
    font-weight: 100;
    font-size: 0.9rem;    
    width: 100%;
    display: block;
`

const ChannelName = styled.h3`
    font-size: 1.2rem;
    font-weight: 500;
`

const VideoWrapper = styled.div`
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;500;700&display=swap');
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 20px;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    margin: 20px;    
    letter-spacing: .025em;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    max-height: 200px;
    min-height: 200px;
    box-sizing: border-box;
`
const Info = styled.div`
    flex: 1 200px;
    overflow: hidden;
    box-sizing: border-box;
    background-color: green;    
    text-overflow: ellipsis;
`

const Wrapper = styled.div`
    flex: 1 200px;      
    margin-right: 20px;
    background-color:red;
    box-sizing: border-box;    
        
`