Datagrid Problem

  • Thread starter Thread starter Stuart Ferguson
  • Start date Start date
S

Stuart Ferguson

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 ?
 
Stuart said:
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 ?
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
 
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;
 
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
 
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
 
(e-mail address removed) Jun 9, 1:07 am show options

Newsgroups: microsoft.public.dotnet.languages.csharp
From: "(e-mail address removed)" <[email protected]> - 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
 
victor Jun 9, 1:19 am show options

Newsgroups: microsoft.public.dotnet.languages.csharp
From: "victor" <[email protected]> - 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

(e-mail address removed) 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top