开发者

dropdownlistfor fill values

I have a table T with fields id, parentid, name. i make relationship with own table so parentid=>id one to many, so if parentid=null it is a parent record, and if parentid n开发者_Go百科ot null it is child record.

After mapping I have class with 2 new properties- T1 (Collection of T) and T2 (Instance of T)

How can I fill dropdownlistfor if I don't have field parentid filled?


You should use the ID field for the DataValueField. That way it's always unique... or am I missing something?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜