korasoglu Posted April 20, 2017 Share Posted April 20, 2017 Arkadaşlar gridcontrola datagridview de olduğu gibi datagridview.rows.add gibi tek satır ekliyemedim çok basittir ama çözemedim. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted April 20, 2017 Share Posted April 20, 2017 gridView1.AddNewRow(); ile ekleyip daha sonra gridView1.SetRowCellValue() ile verileri girin. Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 27, 2017 Author Share Posted April 27, 2017 Hocam teşekkür ederim devexpress her haliyle aykırı Quote Link to comment Share on other sites More sharing options...
KintaRo Posted April 27, 2017 Share Posted April 27, 2017 Evet Grid için Viewler olmasından kaynaklı sanırım Quote Link to comment Share on other sites More sharing options...
korasoglu Posted May 5, 2017 Author Share Posted May 5, 2017 Arkadaşlar gridcontrol double clic nasıl yapabilirim Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 6, 2017 Share Posted May 6, 2017 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 } } Quote Link to comment Share on other sites More sharing options...
korasoglu Posted May 7, 2017 Author Share Posted May 7, 2017 (edited) 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 May 7, 2017 by korasoglu Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 8, 2017 Share Posted May 8, 2017 valla ben hep böyle kullanıyorum, şu an ki projeden bir örnek: Quote Link to comment Share on other sites More sharing options...
korasoglu Posted May 10, 2017 Author Share Posted May 10, 2017 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); } } } Quote Link to comment Share on other sites More sharing options...
korasoglu Posted May 19, 2017 Author Share Posted May 19, 2017 (edited) 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 May 19, 2017 by korasoglu 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.