Hi,
I have XamDataPresenter, we are binding this XamDataPresenter with XML file and data is displaying in Tabular form, My problem is that while right click on any Row( Record), i didn't get Row(Record value), Actually my requirement is that when rigth click on any row i want row index, so i can get any column value on that bases of that index value.
Thanks,
Ajay
You may need to explicitly set the type to string in the Field Settings. If you could replicate the issue in a smaller sample project, I could better determine why sorting isn't working and correct the problem.
Thank you!
Hello Curtis,
I am facing one more issue with Infragistics Grid which is as follows:
My datasource is a list of a class which has a field of type "RecordType". I have overrided the ToString method of "RecordType" class so that when I bind the List of the class, I can see Record Type of each record in the Grid in "Record Type" column.
The problem is that this column is not sortable eventhough RecordType.ToString() returns "Name" Property of the RecordType object which is a String.
I tried to assign a CellValuePresenterStyle to a UnboundField with Label "Record Type" but it shows only arror on the FieldHeader which shows sorting direction but not sorting the contents. This might be because in CellValuePresenter I used Label control to Bind the data (DataItem.RecordType.Name).
Is there any other way to show such type of data in column with Sorting working as I can not change the schema of the class or "RecordType" Class?
Please let me know if you need more details about the problem.
Thanks for the reply!!
I could manage to get the required functionality by using TooltipService and Tooltipopening and Closing events as follows.. I suppressed the default tooltip (using TooltipService methods)and opened Custom Window as tooltip on whcih I can set the focus(which we can not do in Default tooltip). I will give a try with using HitTest but in the link you mentioned, I did it for mouse right click where there was a right mouse button hit, which can help us to get the hiting element. Here I was expecting a mouseOver where there is no mouseButton hit.
<Style TargetType="{x:Type InfraGrid:DataRecordPresenter}">
<Setter Property="ToolTip" Value=""/>
<EventSetter Event="ToolTipOpening" Handler="DRPToolTip"/>
<EventSetter Event="ToolTipClosing" Handler="DRPToolTipClosing"/>
</Style>
Hello Chetan,
The best way to get what you want is to assign a MouseEnter event handler to the XamDataGrid and then use the VisualTreeHelper.HitTest method to figure out which field if any the mouse is over. In this same post further up someone posted some sample code which illustrates how to use HitTest. I have not tested this code, you can find the code in this same forum here:http://community.infragistics.com/forums/p/5985/29501.aspx#29501
A simpler solution would be to assign the MouseEnter directly to the control that the cell uses to present its data. You can assign the MouseEnter event handler to the XamTextEditor (for example) in a CellValuePresenter style. Then you can affect the control directly (depending on what you want to do in the MouseEnter event).
Let us know if you need more help with this.
Hi Curtis,
Is there any Property or event of XamDataPresenter which can give me record on which currently MouseOver happened..? i.e. I want to implement ToolTip like functionality and I want Currnet DataRerord on whcih user has his mouse.