Hello community!
Via searching I found this nice thread http://ko.infragistics.com/community/forums/t/42130.aspx concerning the mouse hover on data row. Great and simple example, Thank you Stefan.
I have the requirement to group my data in the xamdatagrid. If the mouse enters the group header, I should show an image.
I modified the example from stefan, and added a property by which the data could be grouped. Best would be, if I do not only get the group header information but at least one of the gorup childs.Which style must be set in the resources?Thank you for the information.
Hello again!
With the help of this thread http://ko.infragistics.com/community/forums/t/80062.aspx I found the final solution.
I added a style to the XAML file where the grouped data is shown and modified the Tooltip property.
<Style TargetType="{x:Type igWPF:GroupByRecordPresenter}"> <Setter Property="ToolTip" > <Setter.Value> <StackPanel Orientation="Vertical"> <Label Content="{Binding Converter={StaticResource GroupToolTipConv}}" /> <Image Source="{Binding Converter={StaticResource GroupToolTipImageConverter}}" /> </StackPanel> </Setter.Value> </Setter></Style>
If someone still needs the MouseEnter Event on the group header just add the following to your the GroupByRecordPresenter Style
<EventSetter Event="MouseEnter" Handler="DataRecordPresenterGroup_MouseEnter" />
And in the code behind file
void DataRecordPresenterGroup_MouseEnter(object sender, MouseEventArgs e)
{
GroupByRecordPresenter groupPresenter = sender as GroupByRecordPresenter;
if (groupPresenter.DataContext != null)
GroupByRecord rec = groupPresenter.DataContext as GroupByRecord;
if (rec.HasChildren)
if (rec.ChildRecords.Count > 0)
var x = ((rec.ChildRecords[0] as DataRecord).DataItem) as ChartData;
}
Attached please find the complete solution.
Hello Grubarec, Thank you for the code-snippet and the sample application you have provided. I am glad to know you were able to achieve the functionality you were looking for. I believe this thread can help other people looking for a similar solution.If you require any further assistance on this matter, please do not hesitate to ask.