I have a Grid called dgvDetailsTables in my C# application
I need to populated 2 columns of the Grid (Department and Division)
from a list . Currently A click puts the whole record into the Department column.
The code below loads the Combo within the Grid and also gives me a list within the Combo to select from
dgvcmbDepartment.DataSourc
e = GlobalConfig.Connection.Ge
tResponsib
leMgr_All(
);
dgvcmdDepartment.DisplayMe
mber = "FullCodeName"
public string FullCodeName => $"{divisioncode} {deptcode } { deptdesc} ";
See the Grid with the Combo loaded elements of "FullCodeName"
![Combo Withing the Grid already having a list]()
"
I now need to cast the content of "FullCodeName" so that the first element goes into column 6 (Division )
and the Second element goes into coulmn7 (Department)
I am trying to Cast the content of FullCodeName such that i can achieve this goal
but i know my cast statement has an error ( See Code below )
![Wrong Cast Statement]()
Can someone please help to look at the Cast statement and how i should modify it
so that on Click event I get the 2 columns into the grid columns desired.
Thanks
Olukay
Did you try using ListRepsonbileMgrModel instead of var?