Hello,
I'm new to your controls and WPF so for few days I tried to code something with XamlMultiColumComboEditor, and some problems has occurred.
1) How can I get a selected field, ie in a MessageBox, like MessageBox.Show(combobox.SelectedValue.ToString()); because SelectedValue is always null (I put this code in the SelectionChanged event of the control, that may be the reason) and others return me something I don't want and I don't understand.
2) Is it normal that I always have a blank column at the end of my rows ? If so, why, and (how) can I get rid of it properly ?
3) My control displays 3 columns from a dataset. Everything works well until I click on a row, then the text field displays only one value (the last one). Same question as above, but to display the whole row.
4) How can I change the name / title of headers ? They seem to take my database's fields' names, and I don't want that since it's camel cased but not really pretty.
Although this control (and some others) are really usefull, those problems are annoying me, but maybe I didn't search far enough...
And just to be curious : before I discovered Infragistics' controls, I tried to gather about 36 000 rows from my database in a combobox. It took so much time to initialize... and I was so impressed to see yours takes only... almost nothing ! How did you do that ? I struggled for a while to find a way to solve it !
Thanks for your help !
Ah yes indeed, I knew that but I totally forgot it. Your answers were really helpful, thank you again !
This could be easily achieved by specifying the Width of the columns. Each column has a Width property. It is of type ComboColumnWidth - you could check what's the meaning of each value at the following XamGrid help page - don't mind that its XamGrid help page - the ColumnWidth concept is the same. So if you want your columns to take all of the available space you could set the width of each column to a Star value this way all the available space would be evenly divided between all columns. You could, as well, set the Width to a Star value to only one of the columns. This way only this column will take up all of the available horizontal space.
Regards,
Ah yes, ok, I'll try to change it through my code. Weird behaviour though, it would be better if other columns' size was adapted to the remaining space...
Thank you !
The right empty column is the filler column it fill up the remaining space till the end of the dropdown. You could access it through XamMultiComboEditor.Columns.FillerColumn and set its Visibility to collapsed or style it by setting a style to its CellStyle property.
I'm glad I was able to help. If you need any further assistance don't hesitate to ask.
Hmm that's interesting...
I didn't get what you said, I mean, this column is on the right side of the combobox, and the checkboxes' one is on the left side, so they are two different columns. I know that I can disable the checkboxes' side, but I'm actually talking about the right one. Maybe I didn't understand everything here.
Actually there's no point for me to display the whole row in the textfield for the moment, it was just to get every values inside (ie in a MessageBox) in order to do something with them. Thank you then for your sample, I see how you can do it and it may help me in some ways, so you won't need to build me another sample.
I'm just saying that if the AutoGenerateColumns property exists, I don't need to do it by myself, even if I don't have a lot of choices here. No big deal, my user doesn't really need titles I guess so I didn't really want THE solution for this problem but just answers to understand well what how it works. So as I see now in which cases I can use this way, I can say it's answered.
And sorry about my code, I never used DataTables before, and your code will help me if I want to do it later (it seems easier to use for some tests).
Thanks !