473,387 Members | 1,650 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,387 software developers and data experts.

datagrid, dataadapters, and setdatabinding



I have two DataAdapters....1)daStandard does a SELECT *, and
2)daDuplicates uses a stored proc which returns only rows with some
duplicate data.

Problem is, when I butRefresh_Click and I have selected ALL, I am never
able to refresh the data to the DUPS subset of data.
Every click returns ALL records. If I choose DUPS the first time it
works once, but once I do ALL I can no longer get just the DUPS.
I think I am not clearly understanding the relationship betwen
DataAdapter, DataGrid, and SetBinding.

Any help?
protected void BindGrid(Resources.Operations op)
{

switch (op)
{
case Resources.Operations.DUPS :

daDuplicates.Fill(mP3Library1, "MainLibrary");
break;
case Resources.Operations.ALL :
default:

daStandard.Fill(mP3Library1, "MainLibrary");
break;

}
dataGrid1.SetDataBinding(mP3Library1, "MainLibrary");
}
private void butRefresh_Click(object sender, System.EventArgs e)
{
if (checkDups.Checked)
{
BindGrid(Resources.Operations.DUPS);
}
else
{
BindGrid(Resources.Operations.ALL);
}

}

Jul 21 '05 #1
0 1477

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

Similar topics

5
by: PawelR | last post by:
Hello group, I my apps I have two dataGrids - dgParent, dgChild to show rows from two tables. Tables are relations one to more in dataBase. I use sqlDataAdater (sdaParent, sdaChild) to fill myDS....
6
by: Alpha | last post by:
I have several textboxes that I need to chang the text when the selection row is changed in a datagrid. I have the following code. This textbox displayes the initial selection but when I click on...
2
by: scott | last post by:
Hi all First off, thank you for any one that can help. I have a problem trying to link a DataGrideTableStyle to a DataGrid. I have a dataset which reads from a file a xml schema and a xml...
3
by: Doug | last post by:
Hi I have the following code (not mine) that populates a datagrid with some file names. But I want to replace the datagrid with a combo box. private void OnCurrentDataCellChanged(object sender,...
2
by: WStoreyII | last post by:
I wish to make a custom view of relations in a datagrid what i want to do is when the plus sign is clicked instead of showing the link label i want to show a grid with the subtable in that area...
5
by: J | last post by:
Ok, they have changed a lot of stuff in VB.net. How in the world do you hide a column on the Datagrid? -- Jason
2
by: yuanh23 | last post by:
Hi, I have 3 talbes "customers","orders","details". i wanna to use 3 datagrids to show those tables. and when the selected row in parent talbe changes, the selected row in child table changes...
0
by: hillscottc | last post by:
I have two DataAdapters....1)daStandard does a SELECT *, and 2)daDuplicates uses a stored proc which returns only rows with some duplicate data. Problem is, when I butRefresh_Click and I have...
3
by: no | last post by:
Hi all, I have a dataset that contain 2 tables and a relationship between them (master detail). I bind this dataset to a form that include some textboxes that bind to the parent record, and a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.