Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0 DataGridView
I have one Form with Mid parent... 2 nd is Gridview is child of the midparent... 3rd is AddForm
now the question is
when in back my Gridview is open and in front i have Addform open i will add the Data in form and when i click ADD data will be refreshed in The Back Gridview Form
Posted 23-Sep-12 7:36am
Edited 23-Sep-12 7:45am
Wes Aday94.3K
Wes Aday at 23-Sep-12 12:48pm
There is not any kind of a question here. This is not even a description of any kind of a problem.
Bhimani Hiral at 23-Sep-12 12:51pm
but it's simple...question
i want refresh data of datagridview...
when i add in other form
Wes Aday at 23-Sep-12 12:56pm
No it's not a question at all. "I want" is not a question. There is no description of your problem, no code that demonstrates any kind of a problem and nothing that indicates what kind of mechanism you are using to communicate between your forms.
Bhimani Hiral at 23-Sep-12 13:00pm
i give u my whole project ???
.rar file ...??
my project is in
visual studio 2008 C# and SQL server 2008
Bhimani Hiral at 23-Sep-12 13:01pm
my prject contain only 3 fomrs..only
Wes Aday at 23-Sep-12 13:05pm
Why on earth would I want your project? It's simple. Describe your problem, show us what you have tried to do and failed and ask a question related to your problem.
Bhimani Hiral at 23-Sep-12 13:16pm
Here is the Image...
my data fill
now i will add On the Add Button
then my Data Will Be Refresh In The Back side of Grid View..
and Grid View is in the MDIparent...
and my ADD code is ...


String load = "select ClientID,ClientName,Gender,Age,Address,State,City,Pincode,Phone,Mobile,EmailID,Remark from ClientMasterTbl";
SqlDataAdapter adpt = new SqlDataAdapter(load, conn);
Client_Master_Grid.dgClientMaster.DataSource = Client_Master_Grid.dtClientMaster;
Client_Master_Grid cmg = new Client_Master_Grid();

but refresh is done
but not back end side

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please go through the discussion in How to refresh datagridview when closing child form?[^].
The correct answer describes how to refresh Parent GridView from Child forms.

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

  Print Answers RSS
0 Kornfeld Eliyahu Peter 169
1 George Jonsson 145
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,382

Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 23 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100