Hi,
I am looking for a multicolumn combobox with in grid cell. Am using ver 2010.2
I was trying to mix the feature in zip file "testXamComboMulti.zip" attached with artical http://blogs.infragistics.com/forums/p/26793/98421.aspx with "XamComboEditor in DataRecord Cells" sample that comes with infragistics installation, could not find a way to make it work.
On selection of a row in dropdown grid, one of the column value in selected row should be set as main grid cell displaytext and a different column value in selected row should be set as main grid cell's value.
Appreciate any help.
Regards
I had phone conversation with you today and I am adding a note that you want the xamcombobox to appear only in the addnew row of the grid.
Hi
Here is the sample that I mentioned to you that demonstrates that when applying an editor style to a column it will be repeated in the add new row.
I added comboEditors to the grid layout and by customize the style I was able to include the multicolumn layout to the comboEditor that you were asking about.
Your other question was how to cause the newAddRow to contain a xamComboEditor for a column that otherwise show text, not a comboEditor.
Here is the description of the solution that our development staff provided.
Create a custom CellValuePresenter style that contains a Style Trigger which looks at the IsAddRecord property of the associated record (the Record is the DataContext of the CellValuePresenter). If IsAddRecord is true, then set the Template to a Template that contains a ComboBox.
Then use this custom CellValuePresenter style for each string Field where they would like to use a ComboBox.
Hello Marianne,
Thanks for the sample.
I need below functionality as well.
1) in the dropdown, column headers (column/property names of binded data source) needs to be shown.
2) Per your suggestion, to have this combobox only in one of the cell of add row templete record, i tried CellValuePresenter style, could not make it to work. I must be doing some thing wrong here. I have attached modified sample which has CellValuePresenter style.
Thanks,
Shankaar.
Hi Shankaar,
I made a couple of modifications.
The first was to change the cellValuePresenter style’s Template setter value to a template. You had referenced the style directly. I created a controltemplate that contains a xamComboEditor that references the productComboStyle that we had developed using textblocks.
I also commented out the Field Settings that reference the productComboStyle so that our multicolumn combo won’t show up there.
I believe the other issue you mentioned is caused by our customizing the comboeditor template, defining the ComboBoxItem as a group of textblocks. If you want to have column headers within the comboEditor’s dropdown you would want to use a datagrid instead.
I added a ComboBoxItemsProvider and used that in another style that could be applied to a template and used in the CellValuePresenter.
You can see either of these working in this sample by commenting out the appropriate Template property of the CellValuePresenter style.
When you run the sample you will see that the customized xamComboEditor is only in the add new row.
Looks like my sample didn't attach. Let me try that again.
Marianne
It works like a charm. There was a bit issue while adding record, i managed to fix them.
Thanks Marianne.
Glad I could help.
Let me know if you have any other questions.