开发者

how to get filter the data table

i have datatable with which contains all theses columns

columns  as  ID, NAME,PAT开发者_如何转开发H

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


Filtering datatable

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

where 0 is the rowIndex.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜