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
1192
Binding ComboBox that is placed on Header Template of InfragisticGrid(xamwebGrid)
posted

Hi There,

Please suggest me how to achieve below requirement.

Requirement: One column have drop down for row. One more drop down need to add at Header row of that column. If user select any item from drop down of header then set selection to all row.

I used Hedear template and add combobox. But i can't bind directly any collection to this combobox. How can i bound collection recived by WCF Asyn call.

Thanks,
Samir

 

Parents
No Data
Reply
  • 40030
    Suggested Answer
    Offline posted

    Hi Samir, 

    So the easiest way in doing this would probably be to attach a Loaded event to the ComboBox, and then when its loaded, setup your binding. 

    <igGrid:TextColumn.HeaderTemplate>

    <DataTemplate>

    <ComboBox Loaded="ComboBox_Loaded"  />

    </DataTemplate>

    </igGrid:TextColumn.HeaderTemplate>

    private void ComboBox_Loaded(object sender, RoutedEventArgs e)

    {

    Binding b = new Binding("Data");

    b.Source = this;

     

    ((ComboBox)sender).SetBinding(ComboBox.ItemsSourceProperty, b);

    }

    Hope this helps, 

    -SteveZ

     

Children
No Data