Hi,
Is there a way to create unbound columns in the grid? I want to create a button column. I followed the example in the docs and successfully got it to work using the DataTemplate. But I noticed in the output window an error that says:
System.Windows.Data Error: BindingExpression path error: 'MyButton' property not found on 'Silverlight.UI.MyService.MyRecord' 'Silverlight.UI.MyService.MyRecord' (HashCode=64553311). BindingExpression: Path='MyButton' DataItem='Silverlight.UI.MyService.MyRecord' (HashCode=64553311); target element is 'Infragistics.Silverlight.Controls.Cell+c' (Name=''); target property is 'FilterActionValue' (type 'System.Object')..
Is this normal? All the properties in my object are bound in the grid and duplicate keys are not allowed.
Thanks!
Yes, i was able to reproduce this issue. And have written up a bug for it.
For now, if this is causing blocking issues for you, you can simply attach a Dummy ValueConverter to the column:
<ig:UnboundColumn Key="DeleteRowButton" HeaderText=" " ValueConverter="{StaticResource mvc}" HorizontalContentAlignment="Center" HeaderTextHorizontalAlignment="Center" Width="37"> <ig:UnboundColumn.CellStyle> <Style TargetType="ig:CellControl"> <Setter Property="Padding" Value="0"/> </Style> </ig:UnboundColumn.CellStyle> <ig:UnboundColumn.ItemTemplate> <DataTemplate> <Button Click="Button_Click_1"> <Image Source="/images/delete.png" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None" /> </Button> </DataTemplate> </ig:UnboundColumn.ItemTemplate> </ig:UnboundColumn>
public class MVC : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } }
-SteveZ
We are using 10.2 and receiving a very similar error (primary difference is the original post referenced FilterActionValue and ours is on Value).. Can you verify that this was fixed and released?
System.Windows.Data Error: BindingExpression path error: 'DeleteRowButton' property not found on 'Common.Components.UploadFile' 'Common.Components.UploadFile' (HashCode=8508925). BindingExpression: Path='DeleteRowButton' DataItem='Common.Components.UploadFile' (HashCode=8508925); target element is 'Infragistics.Controls.Grids.Cell+CellValueObject' (Name=''); target property is 'Value' (type 'System.Object')..
Here is our column definition:
<ig:UnboundColumn Key="DeleteRowButton" HeaderText=" " HorizontalContentAlignment="Center" HeaderTextHorizontalAlignment="Center" Width="37"> <ig:UnboundColumn.CellStyle> <Style TargetType="ig:CellControl"> <Setter Property="Padding" Value="0"/> </Style> </ig:UnboundColumn.CellStyle> <ig:UnboundColumn.ItemTemplate> <DataTemplate> <Button Click="RemoveSelectedFile_Click"> <Image Source="/images/delete.png" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None" /> </Button> </DataTemplate> </ig:UnboundColumn.ItemTemplate> </ig:UnboundColumn>
I looked into this, and found a bug in the control.
I've addressed the issue, which will be in the first Service Release.
Thanks for the report.