locked
Dynamically Adding Columns in Autocompletebox with DataGrid RRS feed

  • Question

  • How to generate Columns dynamically (runtime) for datagrid attached inside AutoCompleteBox?

    Or

    How to get instance of DataGrid (Implementing ISeletionAdapter @ runtime so that i can add Columns to that dynamically.

    I Tried VisualTreeHelper but could not get the DataGrid/SelectionAdapter

    Thursday, August 26, 2010 3:35 AM

Answers

  • Hi,

    First please make sure the name of your datagrid in AutoCompleteBox's template is "SelectionAdapter", then please try to override AutoCompleteBox, override OnApplyTemplate method, in the method get the SelectionAdapter part and expose it.

    Monday, August 30, 2010 2:33 AM