Click here to Skip to main content
15,898,371 members
Home / Discussions / C#
   

C#

 
GeneralMaking Automated Ebay Signin and Bidding program... Pin
geopass8-Jun-04 23:53
geopass8-Jun-04 23:53 
GeneralRe: Making Automated Ebay Signin and Bidding program... Pin
Colin Angus Mackay9-Jun-04 1:41
Colin Angus Mackay9-Jun-04 1:41 
Questionwhy MyUITypeEditor doesn't work in runtime at some case ? Pin
pig12348-Jun-04 23:47
pig12348-Jun-04 23:47 
QuestionMeta Tags in RTF file? Pin
sachinkalse8-Jun-04 23:05
sachinkalse8-Jun-04 23:05 
AnswerRe: Meta Tags in RTF file? Pin
Heath Stewart9-Jun-04 2:33
protectorHeath Stewart9-Jun-04 2:33 
GeneralRemoting in Windows CE Pin
evilnut8-Jun-04 20:56
evilnut8-Jun-04 20:56 
GeneralRe: Remoting in Windows CE Pin
Heath Stewart9-Jun-04 2:25
protectorHeath Stewart9-Jun-04 2:25 
GeneralPosting records in 2 data grids Pin
orpus8-Jun-04 20:25
orpus8-Jun-04 20:25 
Hi ..
please see the code below..
I have two tables Centrals and Devices both having Central_Id as a common field..I am able to display the Centals table value in the first datagrid (dataGirdCentral).However on click of each cell on the central_id i want the corresponding entries of Devices table to be shown in the 2nd datagrid dataGridDevices..how do i do that...

private void loadCentralDevices()
{
ds = new DataSet();
//Getting schema of Centrals table
DataTable centralDt = new DataTable("Centrals");
String query = "Select * from Centrals";
OleDbDataAdapter da = new OleDbDataAdapter(query,ConfigurationSettings.AppSettings["MsAccess_ConnectString"]);
da.FillSchema(centralDt, SchemaType.Source);
ds.Tables.Add(centralDt);


//Getting schema of Devices table
DataTable deviceDt = new DataTable("Devices");
String query1 = "Select * from Devices";
da = new OleDbDataAdapter(query1,ConfigurationSettings.AppSettings["MsAccess_ConnectString"]);
da.FillSchema(deviceDt,SchemaType.Source);
ds.Tables.Add(deviceDt);

DataRelation dr = new DataRelation("Central_Devices_Relation",
centralDt.Columns["Central_ID"], deviceDt.Columns["Central_Id"]);
ds.Relations.Add(dr);

//create a dataview of the data
DataView centralVw = new DataView(ds.Tables["centralDt"]);
//giving access to Centrals table
centralVw.AllowDelete=true;
centralVw.AllowEdit = true;
centralVw.AllowNew = true;
//set the grid source to the author view
dataGridCentral.DataSource = centralVw;
//hook up the event handler
dataGridCentral.CurrentCellChanged+= new EventHandler(this.dataGridCentral_CellChanging);

}


private void dataGridCentral_CellChanging(object sender, EventArgs eArgs)
{
????? what do i write here to get the corresponding values?
}

Breath dot net
GeneralRe: Posting records in 2 data grids Pin
Vasek8-Jun-04 22:11
Vasek8-Jun-04 22:11 
GeneralRe: Posting records in 2 data grids Pin
Heath Stewart9-Jun-04 2:17
protectorHeath Stewart9-Jun-04 2:17 
GeneralRe: Posting records in 2 data grids Pin
Heath Stewart9-Jun-04 2:20
protectorHeath Stewart9-Jun-04 2:20 
Questionup,down,right,left keys not working with KeyDown event? Pin
User 9625788-Jun-04 20:20
User 9625788-Jun-04 20:20 
AnswerRe: up,down,right,left keys not working with KeyDown event? Pin
Syed Abdul Khader8-Jun-04 23:08
Syed Abdul Khader8-Jun-04 23:08 
GeneralParameters in C# Web Programming Pin
bdi0078-Jun-04 17:22
bdi0078-Jun-04 17:22 
GeneralRe: Parameters in C# Web Programming Pin
Heath Stewart8-Jun-04 17:23
protectorHeath Stewart8-Jun-04 17:23 
GeneralLoading Dlls through C# Pin
ganeshvijay8-Jun-04 16:43
ganeshvijay8-Jun-04 16:43 
GeneralRe: Loading Dlls through C# Pin
Heath Stewart8-Jun-04 17:22
protectorHeath Stewart8-Jun-04 17:22 
GeneralRe: Loading Dlls through C# Pin
Heath Stewart9-Jun-04 2:16
protectorHeath Stewart9-Jun-04 2:16 
GeneralPrint Picture Pin
The_Soul_Of_Rock8-Jun-04 16:21
The_Soul_Of_Rock8-Jun-04 16:21 
GeneralRe: Print Picture Pin
Heath Stewart8-Jun-04 17:26
protectorHeath Stewart8-Jun-04 17:26 
GeneralRe: Print Picture Pin
The_Soul_Of_Rock8-Jun-04 17:58
The_Soul_Of_Rock8-Jun-04 17:58 
GeneralRe: Print Picture Pin
Heath Stewart8-Jun-04 18:02
protectorHeath Stewart8-Jun-04 18:02 
GeneralAbout case assembly version lessoned Pin
pig12348-Jun-04 16:11
pig12348-Jun-04 16:11 
GeneralRe: About case assembly version lessoned Pin
Heath Stewart8-Jun-04 17:32
protectorHeath Stewart8-Jun-04 17:32 
GeneralRe: About case assembly version lessoned Pin
pig12348-Jun-04 19:29
pig12348-Jun-04 19:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.