Hi,
we are using XAM grid in our application, we want that, as we select a particular header we want to get this particular text header and field value.
<ig:XamGrid x:Name="grduser" AutoGenerateColumns="false" ItemsSource="{Binding Path=Userdata}" ColumnWidth="200" Grid.Row="1" > <ig:XamGrid.EditingSettings> <ig:EditingSettings AllowEditing="Row" /> </ig:XamGrid.EditingSettings> <ig:XamGrid.SelectionSettings> <ig:SelectionSettings CellClickAction="SelectRow" RowSelection="Single" /> </ig:XamGrid.SelectionSettings> <ig:XamGrid.RowSelectorSettings> <ig:RowSelectorSettings Visibility="Hidden"></ig:RowSelectorSettings> </ig:XamGrid.RowSelectorSettings> <ig:XamGrid.Columns> <ig:TextColumn Key="User_Name" HeaderText="User Name" Width="100"> <ig:TextColumn.HeaderTemplate> <DataTemplate> <TextBlock Text="Name" /> </DataTemplate> </ig:TextColumn.HeaderTemplate> </ig:TextColumn> </ig:XamGrid.Columns> </ig:XamGrid>
in above example, as we select the header of User Name, we want to get header text and key value of header.
Please let us suggest for that.
Thanks
Hi Pri,
Thank you for your reply. You need to add the style in the resources of your windows e.g. I am attaching a sample application(xamGridHeaderClick.zip) which shows that.
Let me know, if you need any further assistance on this matter.
Thanks for such a great support.Now one more thing I want to ask that, when click on header we want this header should be highlight or focused.
Any suggestion for that.
Thanks.
The header is not meant to change its background when you are selecting it. It changes its background on hovering it because this element is not editable and it is used for sorting, column moving and e.t. but its purpose is not to be selected or focused.
We want to disable sorting when double click on header for that I have added:
IsSorting = (sender as HeaderCellControl).Column.IsSortable = false;
But single click on header, want to sort header again means on single click sorting should be true and on double click sorting should be false:
and for single click : (previewMouseLeftDownEvent) added IsSorting = (sender as HeaderCellControl).Column.IsSortable = true;
But at first Time(On Same Header) we double click(Disable Sorting) Single Click(Enable Sorting) Again Double Click(Not disable sorting),
because of previewMouseLeftDownEvent(enable sorting when we double click).
So is there any single click event for header or any suggestion for that?
Hello Pri,
I am just checking if you require any further assistance on the matter.