Hi,
Here i am using xamgrid to take data from the user.
In that my first coumn should have comboBoxes from which user can select the item. How to place
comboBox within first column cell.
Please give me some suggestions.
also if the user clicks add button means it have to provide new row with again combobox in the first coumn
retaining old row.
Thank You!!!
Thank You Alex....It worked me...:)
Here is a sample code snippet:
First you have to get the desired CellValuePresenter and then use this as parent object of that method.
CellValuePresenter cvp = CellValuePresenter.FromCell(xamDataGrid1.ActiveCell);
var a = Infragistics.Windows.Utilities.GetDescendantFromType(cvp, typeof(XamTextEditor), false);
MessageBox.Show(a.ToString());
Hope this helps,
Alex.
Well,
in this case you can use the Infragistics.Windows.Utilities.GetDescendantFromType() method and give as parameters the CellValuePresenter, typeof(XamComboEditor),false to get the XamComboEditor and get the SelectedValue property.
However, we recommend using the EditorType as my previous post:
<igDP:FieldSettings EditorStyle="{StaticResource StatusFieldStyle}" />
This way, you will be able to get the Value of that cell.
Let me know if you have any questions on this:
I have already wrote method for updating.Remaining 2 fields values i am able to retreive .
But the field which is having combobox populated with xml data....
If a select combobox item active record is not taking the combobox selected item.
It showing null and remaining field values it is taking...and updating in xml file also.
It is updating null value instead of updating with combobox selected item.
i m placing combobox in the field using cellvaluepresenter style here.
so how to take tat cell value which is having combobox.
How to retreive selected combobox item into xamgrid1.active record.
string
Onsite = data.Cells["Onsite"].Value.ToString();
string Offshore = data.Cells["Offshore"].Value.ToString();