Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
Binding to DataRecord.DataItemIndex does not work
posted

Hi, I'm trying to bind to DataItemIndex inside CellValuePresenter's ControlTemplate that's inside XamDataGrid (complete project attached):

<ControlTemplate TargetType="igDP:CellValuePresenter">
    <Button Content="{Binding DataItemIndex}"
            Click="Button_Click" />
</ControlTemplate>

 

Unfortunately, if I delete a row, none of subsequent rows update their button's content even though DataItemIndex value changed and is visible in Button_Click handler.

If I bind to "Index" then everything works correctly. Is this a bug ?

XamDataGridBindToDataRecord.zip
Parents
No Data
Reply
  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into and the sample you provided and I can say that this behavior is expected and occurs by design and the DataItemIndex doesn’t triggers the Binding due to performance optimizations of the XamDataGrid. The VisibleIndex Property works the same way, only the Index Property Triggers the Binding. If you have further questions regarding this feel free to ask.

     

    Looking forward for your reply.

Children