🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Ramazan HABER / C# DEVEXPRESS RMOS / treeList1 ayarları

1-) C# DEVEXPRESS RMOS - treeList1 ayarları

 

treelistedeki node a odaklanmak id ye göre

 

treeList_kategori.FocusedNode = treeList_kategori.FindNodeByKeyID(Convert.ToInt32(id));

 

0-) parent id sini almak

if (treeList1.FocusedNode.ParentNode == null)

            {

                Console.WriteLine(treeList1.FocusedNode.Id);

            }

            else

            {

                Console.WriteLine(treeList1.FocusedNode.ParentNode.Id);

            }

1-) treeList1 ayarları

 public void MyKlasorOlustur(string pAd)

        {

            int count = treeList1.Nodes.Count;

            treeList1.Nodes.Add(count);

            treeList1.Nodes[count].SetValue(0, pAd);

        }

        public void MyDosyaOlustur(int pParentId,string pAd)

        {

           int count = treeList1.Nodes[pParentId].Nodes.Count;

            treeList1.Nodes[pParentId].Nodes.Add(count);

            treeList1.Nodes[pParentId].Nodes[count].SetValue(0, pAd);

        }

 

        private void menuKategoriOlustur_Click(object sender, EventArgs e)

        {

            MyKlasorOlustur("ramazan");

        }

 

        private void menuDosyaOlustur_Click(object sender, EventArgs e)

        {

            MyDosyaOlustur(0,"ramazan");

 

        }

 2021 Ocak 18 Pazartesi
 381