In my last question, I asked about dynamically added layouts. Turns out I didnt need to and thanks to Rob, he got me going. Now I have another design modification where they want to add lookup data to a specific fields so this means I need to add a dropdown to the field(5 fields in all so 5 dropdowns) in the grid. Can this be done dynamically? Or do I need to produce a specialized template of some sort to call?
Constraints is I have various data sources that utilize the same grid so I need to be able to programmatically alter the FieldLayout based on the datasources. I suppose if worse comes to worse I can add another grid to handle the specialized nature of this one datasource and just invis or vis the grids as needed depending on whether or not the datasource is being used. Not sure I want to go that route though...
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
wow thats a bit of difference... Looks like I had things a little backwards. So with it set to the EditorStyle the combo is bound the field? Or does a binding need to be set from the selected value to the actual field? This is what confuses me a bit.
*edit* I ran it and did some checks. It does automatically bind it to the field. very nice!
Thank you very much for the help!!
I have modified the sample you have sent, so now it works correctly. Basically, instead of creating ContentTemplate for the CellValuePresenter and put a XamComboEditor inside, I created Styles for the XamComboEditor itself and set it to the FieldSetting's EditorStyle Property. Please let me know if this helps you or you have further questions on this matter. Looking forward for your reply.
None of links helps me as I am programmatically setting the styles. The sample I sent shows this. I dont predefine any fields in the xaml xamDataGrid so I have to do all the binding on the code side. You have offered no comment to the sample project I sent to indicate what I have done wrong so far or needed to correct. Could you please provide help relevant to the sample project I uploaded? If what I am trying to do cannot be done the way I am doing it I need to know so I can refactor.
Hi,
Thank you for your reply. I have been looking into your question and you need to bind the selected item of the XamComboEditor in order to have a selected value on loading. You could look into the following links where it is whown how to do it:
http://ko.infragistics.com/community/forums/t/90677.aspx
http://ko.infragistics.com/community/forums/t/62824.aspx?PageIndex=2
Now the selection is lost because of the virtualization of the XamDataGrid. Once the binding to the selected item is applied, you will not lost it any more.
Let me know, if you need any further assistance on this matter.