Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a datagrid with 4 fields: From, To ,Title ,Message ;and to buttons + and -. When the + button is clicked a childwindow with 3 textboxs From, To,Title a and a richtextbox Message opens what i want do to is : add a new cell with the inserted values after the user clicked in ok (already have ok and cancel and not valid email functions)with the respectives values for ex :the user clicked in + and in the Title typed a in the From typed a@a.a and in the To typed b@a.a the richtext he just typed a random message after that he clicks in ok and a new cell is added in the grid with the inserted falues in each colum From a@a.a apears in the To b@a.a and in the Title aperas a in the Message the message he typed appers if need the code of this part of the project to make it more easy to understand just say it
Posted
Updated 2-Jul-13 23:06pm
v2

1 solution

Let say you have some List<email> list, which is bound to datagrid. Where Email is your class which has the properties From,To,Title and Message.
So when you click OK on child window, you need to create an object of type Email and assign the values From,To,Message to that object. Once Email object is populated with the user entered data, just add the object to your email list which is already bounded to datagrid.

You ll get to see the new row with user enterd details in child window.

Hope this helps you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900