Hi all
I have Placed One Custome button on Grid Withe refference of the location of rows depending on certain condition
everi thing working fine but whwn rows increase and we need to scroll grid at that time button stay fix with its location for fixing this error i write following code

private void TreeGridView_Scroll(object sender, ScrollEventArgs e)
        {
            string Orienttaion = e.ScrollOrientation.ToString();
            string type = e.Type.ToString();
            string NewValue = e.NewValue.ToString();
            string OldValue = e.OldValue.ToString();
            foreach (string Str in DynamicButtons)
            {
                Control[] bts = new Control[5];
                bts = splitContainer1.Panel2.Controls.Find(Str, true);
                if (TreeGridView.Controls.Contains(bts[0]))
                {
                    int xloc = bts[0].Location.X;
                    int yloc = bts[0].Location.Y;

                    if (type == "SmallIncrement")
                    {
                        int RelChange = Convert.ToInt32(NewValue) - Convert.ToInt32(OldValue);
                        if (Orienttaion == "VerticalScroll")
                        {

                            int UpdatedYloc = yloc - (RelChange * 23);
                            bts[0].Location = new Point(xloc, UpdatedYloc);
                        }
                    }
                    else
                    {
                        int RelChange = Convert.ToInt32(OldValue) - Convert.ToInt32(NewValue);
                        if (Orienttaion == "VerticalScroll")
                        {
                            int UpdatedYloc = yloc + (RelChange * 23);

                                bts[0].Location = new Point(xloc, UpdatedYloc);
                        }
                    }
                }
            }

        }

DynamicButtons is List of string holding Names of buttons we have to move with scrollbar we used
its working fine exactaly perfevt the problem is only that when we change the size of form like we make form small at that time it buttons not moving perfectaly with its corrousponding row
So any one having knowlage with this issue Please revert atn hepl me on this issue asap
Thank you in advance

Recommended Answers

All 3 Replies

Elit markların reklam sitesi geri sayıma başladı. Sizde sitenizin reklamını verebilirsiniz. Sadece reklamcılığı hedef edinen site. Sanal alışverişin "Paris'i " yakında. Alışveriş, indirim, kampanya, alışveriş siteleri, ucuz, kalite, markalar eğer sizde bu kelimeleri arıyorsanız doğru adrestesiniz http://www.elitmarkalar.com/ da. Sitemizi takip ederek sürpriz hediyeler kazanabilirsiniz.

Can Any body Has Idea for this Issue Please Revert

I need an code for DataGridScrollbar it should work exactly like a Facebook Scrollbar..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.