Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to bind 'Id' field to tag of image which inside column of xceed datagrid.

<xcdg:column fieldname="D" title="Delete" width="50" cellhorizontalcontentalignment="Center" cellverticalcontentalignment="Center" xmlns:xcdg="#unknown">
<xcdg:column.cellcontenttemplate>
<datatemplate>
<Image Source="{StaticResource imgDelete}" Tag="{Binding Id}" Width="16" Height="16" Cursor="Hand"
x:Name="imgEdit" MouseLeftButtonUp="imgDelete_MouseLeftButtonUp" ToolTipService.ToolTip="Edit" />




But in event handler I am getting Tag as null.

private void imgDelete_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
AreaId = Convert.ToInt32((sender as Image).Tag);
catch (Exception en)
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900