473,426 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

Datagrid Problem

I currently have a datagrid which is populated from a dataset table
however the contents of the table how can i clear the grid and
repopulate it ?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
6 1569
Stuart Ferguson wrote:
I currently have a datagrid which is populated from a dataset table
however the contents of the table how can i clear the grid and
repopulate it ?

*** Sent via Developersdex http://www.developersdex.com ***

I usually do something like this:

myDataGrid.DataBindings.Clear();
myDataGrid.DataSource = null;
myDataGrid.DataMember = "";

Not sure if this is the recommended way but it works for me.

Then to repopulate just set use teh SetDataBinding property or
DataBindings method.

John
Nov 17 '05 #2
hi stuart

for repopulate your data write a one function and when u require call
that function like this

dataset ds = new dataset();
da.fill(ds);
datagrid.datasource=ds;
datagrid.databind();

it will work properly;

Nov 17 '05 #3
hi stuart

for repopulate your data write a one function and when u require call
that function like this

dataset ds = new dataset();
da.fill(ds);
datagrid.datasource=ds;
datagrid.databind();

it will work properly;
vijay

Nov 17 '05 #4
hi stuart

for repopulate your data write a one function and when u require call
that function like this

dataset ds = new dataset();
da.fill(ds);
datagrid.datasource=ds;
datagrid.databind();

it will work properly;
vijay

Nov 17 '05 #5
vi**********@gmail.com Jun 9, 1:07 am show options

Newsgroups: microsoft.public.dotnet.languages.csharp
From: "vijaygpar...@gmail.com" <vijaygpar...@gmail.com> - Find messages
by this author
Date: 8 Jun 2005 22:07:59 -0700
Local: Thurs,Jun 9 2005 1:07 am
Subject: Re: Datagrid Problem
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse

hi stuart
for repopulate your data write a one function and when u require call
that function like this
dataset ds = new dataset();
da.fill(ds);
datagrid.datasource=ds;
datagrid.databind();
it will work properly;
victor

Nov 17 '05 #6
victor Jun 9, 1:19 am show options

Newsgroups: microsoft.public.dotnet.languages.csharp
From: "victor" <vijaygpar...@gmail.com> - Find messages by this author

Date: 8 Jun 2005 22:19:27 -0700
Local: Thurs,Jun 9 2005 1:19 am
Subject: Re: Datagrid Problem
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse

vijaygpar...@gmail.com Jun 9, 1:07 am show options


hi stuart
for repopulate your data write a one function and when u require call
that function like this
dataset ds = new dataset();
da.fill(ds);
datagrid.datasource=ds;
datagrid.databind();
it will work properly;
vij

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
0
by: Richard Ryerson | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls (watch...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
0
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported a...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.