开发者

how to get filter the data table

开发者 https://www.devze.com 2022-12-10 04:57 出处:网络
i havedatatablewithwhichcontainsall thesescolumns columnsasID, NAME,PAT开发者_如何转开发H i ambinding thedatatabletoID, Nameindropdowncontrol. once the userselects a valueof\"name\"in thedropdown

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

精彩评论

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