views:

31

answers:

1

hi. i have datatable with which contains all theses columns

columns  as  ID, NAME,PATH

i am binding the datatable to ID, Name in dropdown control. once the user selects a value of "name" in the dropdown . i'll get the ID of it . basesd on that then i need to get the corresponding path value in a string

thank you

+1  A: 

Filtering datatable

DataView dtView = dtbl.DefaultView;
dtView.RowFilter = "[ID] <> 'ddlValue'";
value = dtView[0]["yourColumnName"].ToString();

where 0 is the rowIndex.

Muhammad Akhtar
now i am able to get the filter records it contains 1 row with 3 columns . now i need to assign these values into string what is syntax to do it
prince23
simply value = dtView[0]["yourColumnName"].ToString();
Muhammad Akhtar