Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

Grid Control


korasoglu
 Share

Recommended Posts

  • 2 hafta sonra ...

gridView DoubleClick eventine:

            int hnd = gridView1.FocusedRowHandle; // seçili olan satır
            if (gridView1.IsValidRowHandle(hnd)) // eğer seçili olan satır geçerliyse yani boş bir yere tıklanmamışsa
            {
            	if (hnd > -1) // sütun başlıklarına değil de sadece satırlara tıklanmışsa
                {
                	// kodlar
                }
            }

 

Link to comment
Share on other sites

 

Hocam, kafayı yiyecem çok basit bir olay ama çözemedim seçilen ve çift tıklanan satır bilgisini alacam hepsi bu ama olmuyor.

Sizin örnekte columns'a çift tıklayınca oluyor ama rows'a çift tıklayınca olmuyor.

int hnd = gridView2.FocusedRowHandle; // seçili olan satır
            
            if (gridView2.IsValidRowHandle(hnd)) // eğer seçili olan satır geçerliyse yani boş bir yere tıklanmamışsa
            {
                
                if (hnd > -1) // sütun başlıklarına değil de sadece satırlara tıklanmışsa
                {
                    MessageBox.Show("Test");
                }
            }

Ben hem hem clik hemde double clik te işlem yapmak istiyorum olmuyor. 

Cllikte Bilgileri şu sekilde aldım

private void gridView2_ShownEditor(object sender, EventArgs e)
        {
            int hnd = gridView1.FocusedRowHandle;
            ad = gridView1.GetRowCellDisplayText(hnd, gridView1.Columns[0]);
            MessageBox.Show(ad); 
        }

 

Ama Çiktık Hala Yok;

Edited by korasoglu
Link to comment
Share on other sites

Hocam şimdi baktım

 

gridView1.getText yok gridView1.GetRowCellDisplayText var gridcontrol ve gridview double clikine yazdım çalışmadı.

private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            int hnd = gridView1.FocusedRowHandle; 
            if (gridView1.IsValidRowHandle(hnd)) // eğer seçili olan satır geçerliyse yani boş bir yere tıklanmamışsa
            {
                if (hnd > -1) // sütun başlıklarına değil de sadece satırlara tıklanmışsa
                {
                    
                    bilgiyukle.id = gridView1.GetRowCellDisplayText(hnd, gridView1.Columns[0]);
                    MessageBox.Show(bilgiyukle.id);
                }
            }
        }

Link to comment
Share on other sites

  • 2 hafta sonra ...

 

Hocam örneği gördüm püf noktası OptionsBehavior Editable = False olması gerekiyormuş o zaman  çalışıyor.

int hnd = gridView2.FocusedRowHandle;
            if (gridView2.IsValidRowHandle(hnd))
            {
                if (hnd > -1)
                {
                    string id = gridView2.GetRowCellDisplayText(hnd, gridView2.Columns[0]);
                    string isim = gridView2.GetRowCellDisplayText(hnd, gridView2.Columns[1]);
                    string sehir = gridView2.GetRowCellDisplayText(hnd, gridView2.Columns[2]);

                    MessageBox.Show(String.Format("ID: {0}{1}İsim: {2}{1}Şehir: {3}", id, Environment.NewLine, isim, sehir));
                }
            }

Edited by korasoglu
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...