Click here to Skip to main content
15,561,817 members
Home / Discussions / C#
   

C#

 
Question'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
jasonalien4-Sep-14 3:04
jasonalien4-Sep-14 3:04 
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Richard Deeming4-Sep-14 3:31
mveRichard Deeming4-Sep-14 3:31 
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Deflinek4-Sep-14 3:44
Deflinek4-Sep-14 3:44 
GeneralRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
jasonalien4-Sep-14 3:47
jasonalien4-Sep-14 3:47 
GeneralRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Deflinek4-Sep-14 3:54
Deflinek4-Sep-14 3:54 
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Swinkaran4-Sep-14 20:58
professionalSwinkaran4-Sep-14 20:58 
Questionhow to transfer the values of textboxes from one form to another form in datagridviw control without using database Pin
Member 110574883-Sep-14 19:56
Member 110574883-Sep-14 19:56 
AnswerRe: how to transfer the values of textboxes from one form to another form in datagridviw control without using database Pin
Ganesh KP3-Sep-14 20:19
professionalGanesh KP3-Sep-14 20:19 
This is so simple to do.

Create a class which contains 3 properties for all three text boxes.

Say for example here is the sample code

C#
public class Form1Class
{
   public string TextBox1Value { get; set; }

   public string TextBox2Value { get; set; }

   public string TextBox3Value { get; set; }

}


Now say for example you have a button named Button1 and on the click even, you need to open Form2 and bind the textbox values to datagridview.

For this, first you have to create an object of Form1Class which will take these three textbox values into my object (here it is Form1Class). Once you created an object, you need to pass the object to Form2

Here, you have to think about data passing mechanism from one form to another form (Form1 to Form2).

There are many methods that we can pass data from one form to another.

1. You can use sessions, querystring etc...

For detailed view of how to pass data from one form to another form in asp.net , have a look at below links

MSDN article

or this article also gives you an idea
Null Skull link

Once you pass the data from From1 to Form2 and the receiver side (i.e Form2) you need to receive the data and bind it to the datagridview.

As you are passing a single object from Form1 to Form2 and you need to see how to bind an object to datagridivew.

here is the stackoverflow answer on how to bind an object or a list of object(s) to a datagridview.

Stack Overflow answer

Once you are bind the data to a datagrid view, you can able to see the data that you enter in textbox(es) in Form1.

Try this and let us know, if it is working or else facing any issues.

Happy coding Smile | :)
Regards,
Ganesh

AnswerRe: how to transfer the values of textboxes from one form to another form in datagridviw control without using database Pin
Pankaj Bhandari085-Sep-14 2:52
Pankaj Bhandari085-Sep-14 2:52 
QuestionNeed help with Expression Trees... Pin
SledgeHammer013-Sep-14 19:44
SledgeHammer013-Sep-14 19:44 
QuestionRe: Need help with Expression Trees... Pin
Richard Deeming4-Sep-14 2:23
mveRichard Deeming4-Sep-14 2:23 
AnswerRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 5:58
SledgeHammer014-Sep-14 5:58 
AnswerRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 9:30
SledgeHammer014-Sep-14 9:30 
GeneralRe: Need help with Expression Trees... Pin
Richard Deeming4-Sep-14 9:39
mveRichard Deeming4-Sep-14 9:39 
GeneralRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 11:19
SledgeHammer014-Sep-14 11:19 
AnswerRe: Need help with Expression Trees... Pin
Eddy Vluggen4-Sep-14 6:14
professionalEddy Vluggen4-Sep-14 6:14 
GeneralRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 8:29
SledgeHammer014-Sep-14 8:29 
QuestionFramework Update On a Soution Pin
wonder-FOOL3-Sep-14 11:21
wonder-FOOL3-Sep-14 11:21 
AnswerRe: Framework Update On a Soution Pin
Kornfeld Eliyahu Peter3-Sep-14 11:56
professionalKornfeld Eliyahu Peter3-Sep-14 11:56 
Questionwcf object serialization without datacontract/datamemember attributes strange behavior Pin
impeham3-Sep-14 3:35
impeham3-Sep-14 3:35 
AnswerRe: wcf object serialization without datacontract/datamemember attributes strange behavior Pin
Gerry Schmitz3-Sep-14 11:24
mveGerry Schmitz3-Sep-14 11:24 
Questionviewing photo from MySQL Pin
Jassim Rahma3-Sep-14 1:58
Jassim Rahma3-Sep-14 1:58 
QuestionRe: viewing photo from MySQL Pin
Richard MacCutchan3-Sep-14 2:30
mveRichard MacCutchan3-Sep-14 2:30 
AnswerRe: viewing photo from MySQL Pin
Jassim Rahma3-Sep-14 2:41
Jassim Rahma3-Sep-14 2:41 
GeneralRe: viewing photo from MySQL Pin
Richard Deeming3-Sep-14 2:42
mveRichard Deeming3-Sep-14 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.