473,666 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Clic k 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(Resour ces.Operations op)
{

switch (op)
{
case Resources.Opera tions.DUPS :

daDuplicates.Fi ll(mP3Library1, "MainLibrar y");
break;
case Resources.Opera tions.ALL :
default:

daStandard.Fill (mP3Library1, "MainLibrar y");
break;

}
dataGrid1.SetDa taBinding(mP3Li brary1, "MainLibrar y");
}
private void butRefresh_Clic k(object sender, System.EventArg s e)
{
if (checkDups.Chec ked)
{
BindGrid(Resour ces.Operations. DUPS);
}
else
{
BindGrid(Resour ces.Operations. ALL);
}

}

Jul 21 '05 #1
0 1507

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

Similar topics

5
2678
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. DataSource in dgParent I have set myDS.Tables (for dgChild myDS.Tables); My questions: How show in dgChild only rows where show only child for parent selected in dgParent? Which event us (double click, leave etc.)?
6
3317
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 different rows in the datagrid, the textbox content doesn't change to reflect the change. How can I address this? Also, If the user change the text in the textbox then how do I refesh the display in the datagrid to reflect the changes? ...
2
1540
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 file. This is done using the ReadXmlSchema and ReadXml. I then create a DataTable to get access to the tables in the data set.
3
2996
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, System.EventArgs e) {try{ DataSet ds = dgMembers.DataSource as DataSet;
2
332
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 between the selected grid and the next grid. however i cannot seem to find a method of obtaing the position coordinate for that area.? and ideas on how to go about finding the position? WStoreyII
5
7808
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
1754
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 automaticly. If there is only 2 tables, that's quite easy. add the relation "CusVsOrder" to dataset. binding the "patient" with the parent datagrid, binding the relation "customers.CusVsOrder" with the child datagrid. while, now there are 3 tables,...
0
285
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 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.
3
1670
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 datagrid that is binded to the detailed records. Here is the code: Code:
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7385
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6192
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1772
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.