i have a win application which im doing using C# and .NET in Visual Studio 2010
i have a data grid to which im binding some data from the database. i also have two radio buttons to which im binding distinct values of a particular column from the same database table.
after loading the table, i make some changes to the radio button text,it should automatically update those values in the datagrid view also in that particular column.
please let me know of the code to implement this functionality

Hi, would you mind showing us the code you got there - would be faster to salve the issue. Thx in advance.

string select= "select * from flowdata..data6_checklistlayouts where fk_ecytypes=269"
dataset ds=objAccess.fetchfromDB(select);
string radiobtn="select distinct layoutid from flowdata..data6_checklistlayouts where layoutid lik eadditional%"
dataset ds1=objAccess.fetchfromDB(radiobtn);
int i=0;
string[] radiobtnval=convert.tostring(ds1.tables[0]);

Im not sure bout he queries but radiobtn query fetches 3 values and puts it in the text boxes

when i make changes in radio text boxes it has to change in datagirdview1 for layout id

datagridview1 has a column as layout id]
thanks in advance

That loop is not ok. I dont even know how the varible "radiobtnval" is accessable outside of the loop, because you initialize it inside of the loop. And one more thing. Every time the code goes throught the loop oversides the array, so it will alway be filled with only the data on the last loop.

Lets repair this loop to:

1.This is when you want to loop trought all the rows:

List<string> list = new List<string();


Or would you like to get only values from one row? From 1st row (you stated row[0])?