回复 2楼iceman的帖子
你好,我根据你里例子 修改了下代码
前台不加入模板,直接在后台
- public AnalysisOfExpRuleOfMoneyData()
- {
- InitializeComponent();
- this.Loaded += new RoutedEventHandler(AnalysisOfExpRuleOfMoneyData_Loaded);
- dgList.LoadedCellPresenter += new EventHandler<C1.Silverlight.DataGrid.DataGridCellEventArgs>(dgList_LoadedCellPresenter);
- }
- void dgList_LoadedCellPresenter(object sender, C1.Silverlight.DataGrid.DataGridCellEventArgs e)
- {
- TextBlock tBlock = e.Cell.Presenter.Content as TextBlock;
- ToolTipService.SetToolTip(e.Cell.Presenter, tBlock.Text);
- }
复制代码
可以展现出鼠标停留时候列的浮动层,但是如果我是想 鼠标停留在A列的时候,显示B列的数据 在该如何绑定呢?
补充 测试中发现
如果grid里包含模板列的话 ,也会报错
- <c1datagrid:DataGridHyperlinkColumn Header="规则名称" Width="Auto" FilterMemberPath="RULE_NAME" Click="DataGridHyperlinkColumn_Click">
- <c1datagrid:DataGridHyperlinkColumn.ContentTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding RULE_NAME}"></TextBlock>
- </DataTemplate>
- </c1datagrid:DataGridHyperlinkColumn.ContentTemplate>
- </c1datagrid:DataGridHyperlinkColumn>
复制代码 |