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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -