Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
How to display and edit cell value, which has custom object(user defined datatype) for every cell as a data


Consider i have a student class like following

class Student{

public string Name {get; set;}

public int StudentID {get; set;}

public bool IsActive {get; set;}


Now i will be creating a datatable where some of the columns are of Student datatype. When i bind this to grid, i provide user with option to select what value out of these three properties he would like to see in grid, which will be editable too.

I am not able to find a way where i show a single property out of this custom object in a cell, and to update back it in case of modification.

I tried using FormatProvider for cell and able to show property selected by user, but not able to update the property back when edited. Rather i am getting exception related to datatype.

Please guide me to implement this functionality in the grid

Parents Reply Children
No Data