PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Beginner question, help!

Reply

Beginner question, help!

 
Thread Tools Rate Thread
Old 17-04-2008, 01:28 PM   #1
Pablo Czyscas
Guest
 
Posts: n/a
Default Beginner question, help!


Hi, i´m new developping app, and my question is:

I´ve 2 forms, fomr1 anf form2. In my form1 i´ve a datagrid that show some
data products from a SQLCE db... the form2 has a textbox where the user fill
a product name... how can i accomplish when the form2 is show, the user
enter into the textbox a product name, and when he press ok and the form2 is
closed, the form1 show the new data ?

Thanks a lot!


  Reply With Quote
Old 17-04-2008, 02:09 PM   #2
Armando Rocha
Guest
 
Posts: n/a
Default Re: Beginner question, help!

Hi,

You can do that in form1_Activated, when you close form2, you can refresh
datagrid on form1 activated.

hope this help.

--
Armando Rocha
Mobile Developer

http://www.ifthensoftware.com
"Pablo Czyscas" <turton_1@hotmail.com> escreveu na mensagem
news:exAHCaIoIHA.4832@TK2MSFTNGP02.phx.gbl...
> Hi, i´m new developping app, and my question is:
>
> I´ve 2 forms, fomr1 anf form2. In my form1 i´ve a datagrid that show some
> data products from a SQLCE db... the form2 has a textbox where the user
> fill a product name... how can i accomplish when the form2 is show, the
> user enter into the textbox a product name, and when he press ok and the
> form2 is closed, the form1 show the new data ?
>
> Thanks a lot!
>
>


  Reply With Quote
Old 17-04-2008, 05:09 PM   #3
Jin Chang
Guest
 
Posts: n/a
Default Re: Beginner question, help!

On Apr 17, 7:28 am, "Pablo Czyscas" <turto...@hotmail.com> wrote:
> Hi, i´m new developping app, and my question is:
>
> I´ve 2 forms, fomr1 anf form2. In my form1 i´ve a datagrid that show some
> data products from a SQLCE db... the form2 has a textbox where the user fill
> a product name... how can i accomplish when the form2 is show, the user
> enter into the textbox a product name, and when he press ok and the form2 is
> closed, the form1 show the new data ?
>
> Thanks a lot!


I assume that you're opening the edit form using ShowDialog. If so,
set the this.DialogResult to an appropriate DialogResult enum value
(i.e. DialogResult.OK) before closing. From the caller, you can
retrieve the return value which should be the value you have just set
and take appropriate actions, such as rebinding your datagrid to show
the changes.
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off