c# - How to get the Entity name and type from DataGrid? -


this seems should straight forward, can't seem models entities type , name?

i can class name/type, not properties inside class accessing while editing datagrid.

this event in trying values:

protected void ondatagrid_celleditending(object sender, datagridcelleditendingeventargs e)     {         if (e.editaction == datagrideditaction.commit)         {             var usercontrol = findvisualparent<userview>(sender uielement);             var rowtype = e.row.item.gettype(); //this gets class type                //trying name , type of entity here             var name  = e.row.item. ??????             var type = e.row.item.gettype(). ??????         }                 } 

and model, using code first entityframework

public partial class bank {     public system.guid id { get; set; } // id (primary key)     public string section { get; set; } // section (length: 50)     public string name { get; set; } // name (length: 50)      public bank()     {         initializepartial();     }      partial void initializepartial(); } 

to try make things little more clearer, trying property name , type of of property named section in above class. how do ondatagrid_celleditending event?


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -