How to obtain the selected row from the LookUp editor? is it possible to do same in gridview ??
How to access a selected lookup value in a grid
Answers approved by DevExpress Support
Hi,
To learn how to access values in a grid, I recommend reading through the Obtaining and Setting Cell Values help article.
We hope that you find this information helpful.
Hello,
I see in your second screenshot that the event handler is called repositoryItemGridLookUpEdit1_EditValueChanged.
Does this handler refer to the RepositoryItemGridLookUpEdit class instance? If so, it is not correct to cast the sender to the LookUpEdit class. Cast it to the GridLookUpEdit class:
C#GridLookUpEdit lookUpEdit = sender as GridLookUpEdit;
DataRowView selectedDataRow = (DataRowView)lookUpEdit.GetSelectedDataRow();
I hope you find this information useful and am looking forward to your results.