c# - clicking data in datagridview then passing the data to popup window -
i want ask, how code when want pass data popup window clicking column
in datagridview
. please help!
try { lessee_message frm = new lessee_message( datagridview1.currentrow.cells["id"].value.tostring())); frm .showdialog(); } catch(exception a) { }
what wrong code?
you must create overloaded constructor in lessee_message form pass string parameter.
lessee_message should have this:
public partial class lessee_message : form { //this further use. pass parameter, private field not required. private string _id=""; public lessee_message (string id) { _id=id; initializecomponent (); } }
Comments
Post a Comment