TreeList不顯示分級列表

在使用Dev的treelist的過程中遇到了一個糟心的事,綁定好數據源,設置完KeyFieldName和ParentFieldName

            DataTable dtPublictree = pADOHelper.GetDataTable("SELECT * from " + CommonClass.tableTreePublic + "  where c_appid = '" + strAppID + "'order by i_order asc,c_name desc");//order by c_code
            treeList1.DataSource = dtPublictree;
            treeList1.KeyFieldName = "i_id";
            treeList1.ParentFieldName = "i_pid";

但是!死活顯示不了層級

百度到心累,終於在一篇博客裏找到了線索:TreeList不顯示分級列表---Dev踩坑記

改完字段類型

alter table pt_webapps_tree_public_t alter  COLUMN  i_pid  type int8 using i_pid::int8 ;

 

完美顯示:

失之毫釐差之千里,僅僅是int8和int4的區別,結果造成這麼個問題。謹記!!

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章