Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: DataGrid


Message #1 by "Virgil Carroll" <vcarroll@i...> on Mon, 2 Dec 2002 17:44:03 -0600
Group,

Does anyone know if there is a way to make a row in a datagrid not show 
up on Databinding?  Or delete it on-the-fly without the Delete Command?

My query that I am using in the datasource occasionally has duplicate 
records.  I want to look for the duplicate records and not show the 
duplicate, is that possible?

Thanks in advance.

Tx,
Virgil Carroll
President/CEO
iStream Interactive
13288 Killdeer Street NW
Coon Rapids, MN 55448
(xxx) xxx-xxxx
(xxx) xxx-xxxx  Cell
vcarroll@i...
www.istreaminteractive.com


Message #2 by "Carole D. Sullivan" <carolesullivan@e...> on Tue, 3 Dec 2002 01:29:39
If you use "select distinct" in your SQL (I use SQL server) then you only 
get one of whatever it is you requested.  

Otherwise, if you have criteria on which you can base your decision - you 
can loop thru the dataset and manipulate it.

Carole

> Group,

Does anyone know if there is a way to make a row in a datagrid not show 
up on Databinding?  Or delete it on-the-fly without the Delete Command?

My query that I am using in the datasource occasionally has duplicate 
records.  I want to look for the duplicate records and not show the 
duplicate, is that possible?

Thanks in advance.

Tx,
Virgil Carroll
President/CEO
iStream Interactive
13288 Killdeer Street NW
Coon Rapids, MN 55448
(xxx) xxx-xxxx
(xxx) xxx-xxxx  Cell
vcarroll@i...
www.istreaminteractive.com


Message #3 by "Satish Pahade" <psatish@p...> on Tue, 3 Dec 2002 11:29:14 +0530
You can do it by using DataView object like this. dataview object provides
Sort and RowFilter methods to sort or filter view data.

DataView dv  = ds.Tables[0].DefaultView;
dv.RowFilter = " ID > 0 ";     // Any criteria that will discart records

datagrid1.DataSource = dv;
datagrid1.DataBind();

Satish

----- Original Message -----
From: "Virgil Carroll" <vcarroll@i...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, December 03, 2002 5:14 AM
Subject: [aspx] DataGrid


Group,

Does anyone know if there is a way to make a row in a datagrid not show up
on Databinding?  Or delete it on-the-fly without the Delete Command?

My query that I am using in the datasource occasionally has duplicate
records.  I want to look for the duplicate records and not show the
duplicate, is that possible?

Thanks in advance.

Tx,
Virgil Carroll
President/CEO
iStream Interactive
13288 Killdeer Street NW
Coon Rapids, MN 55448
(xxx) xxx-xxxx
(xxx) xxx-xxxx  Cell
vcarroll@i...
www.istreaminteractive.com





Message #4 by "Lewis Bass" <lewis@t...> on Tue, 3 Dec 2002 08:00:36 -0800
take your query and either select distinct * from ...
or use select unique * from ....
depending on your database engine (some support one over the other)
and your duplicates will disapear!

-----Original Message-----
From: Virgil Carroll [mailto:vcarroll@i...]
Sent: Monday, December 02, 2002 3:44 PM
To: ASP.NET
Subject: [aspx] DataGrid


Group,

Does anyone know if there is a way to make a row in a datagrid not show up
on Databinding?  Or delete it on-the-fly without the Delete Command?

My query that I am using in the datasource occasionally has duplicate
records.  I want to look for the duplicate records and not show the
duplicate, is that possible?

Thanks in advance.

Tx,
Virgil Carroll
President/CEO
iStream Interactive
13288 Killdeer Street NW
Coon Rapids, MN 55448
(xxx) xxx-xxxx
(xxx) xxx-xxxx  Cell
vcarroll@i...
www.istreaminteractive.com




Message #5 by "jayathakar" <jayathakar@y...> on Fri, 6 Dec 2002 15:25:21
> Group,

Does anyone know if there is a way to make a row in a datagrid not show 
up on Databinding?  Or delete it on-the-fly without the Delete Command?

My query that I am using in the datasource occasionally has duplicate 
records.  I want to look for the duplicate records and not show the 
duplicate, is that possible?


Select of datatable is one way you can do this.The other is setting the 
viewstate and visible property as false for that row in datagrid .

--Regards
Jaya

Thanks in advance.

Tx,
Virgil Carroll
President/CEO
iStream Interactive
13288 Killdeer Street NW
Coon Rapids, MN 55448
(xxx) xxx-xxxx
(xxx) xxx-xxxx  Cell
vcarroll@i...
www.istreaminteractive.com



  Return to Index