Displaying records in Data Grid

  • Thread starter Thread starter sups sups via .NET 247
  • Start date Start date
S

sups sups via .NET 247

Hi..
I have two tables one called State and the other called City.

State City
State_ID City_ID
State_Name City_Nm
State_ID

and so on..
I have created 2 datagrids.
In the upper datagrid i want the state table to be displayed.When the user clicks on each cell of this datagrid, i.e on the state, its respective cities should be displayed in the nxt datagrid.
I do not want to bind the db to the grid at design time..I want to do it programatically.How do I do it. My application is a 3tier appl.

Thanks in advance..
 
elo,
you have to change the sqlselect command in dataadapter, wich is conected
with dataset wich is conected to second datagrid, every time when user will
click i first datagrid. Then, just dataadapter.fill( dataset ), and
second_datagrid.refresh();
hope help


Darek


Uzytkownik "sups sups via .NET 247 said:
Hi..
I have two tables one called State and the other called City.

State City
State_ID City_ID
State_Name City_Nm
State_ID

and so on..
I have created 2 datagrids.
In the upper datagrid i want the state table to be displayed.When the user
clicks on each cell of this datagrid, i.e on the state, its respective
cities should be displayed in the nxt datagrid.
I do not want to bind the db to the grid at design time..I want to do it
programatically.How do I do it. My application is a 3tier appl.
 

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