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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -