Click here to Skip to main content
12,896,175 members (52,998 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#2.0 C# 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 6:36am
Updated 23-Sep-12 6:45am
Wes Aday104.2K
Wes Aday 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 23-Sep-12 12:51pm
but it's simple...question

i want refresh data of datagridview...
when i add in other form
Wes Aday 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 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 23-Sep-12 13:01pm
my prject contain only 3 fomrs..only
Wes Aday 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 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 23 Sep 2012
Copyright © CodeProject, 1999-2017
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