korasoglu Posted July 3, 2015 Share Posted July 3, 2015 Arkadaşlar listBox veya dataGriWiev'e item ve item datasına veri ekleyip çağırmayı nasıl yapabilirim dört satır yeterli Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 4, 2015 Share Posted July 4, 2015 ListBox için bir örnek hazırladım. Datagridview'i yetiştiremedim https://yadi.sk/d/lQq3-ZZ_hfDG8 Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 8, 2015 Author Share Posted July 8, 2015 Şu kullanım doğrumudur. DataTable data = new DataTable(); FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.Description = "Seçim Yapınız"; if (dialog.ShowDialog() == DialogResult.OK) { listBox1.Items.Clear(); listBox1.Refresh(); data.Columns.Add("veri"); data.Columns.Add("data"); string folderName = dialog.SelectedPath; foreach (string f in Directory.GetFiles(folderName))//(folderName) { FileInfo dosyabilgisi = new FileInfo(f); data.Rows.Add(dosyabilgisi.Name.ToString(), dosyabilgisi.ToString()); listBox1.DisplayMember = "veri"; // listboxta görüntülenecek verileri data tablosunun veri sutununundan alıyoruz listBox1.ValueMember = "data"; // listboxta satırlara depolanacak dataları data tablosunun data sütunundan alıyoruz listBox1.DataSource = data; // listbox kaynak data için tablomuzu veriyoruz } } Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 8, 2015 Share Posted July 8, 2015 doğru görünüyor, test ettiniz mi? çalışıyorsa sorun yok Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 8, 2015 Author Share Posted July 8, 2015 evet çalışıyor ozaman şu şekilde data.Columns.Add("data"); istediğimiz kadar tanımlıyabiliriz. Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 13, 2015 Author Share Posted July 13, 2015 (edited) Herkesin Kadir gecesi hayırlı mubarek olsun. -------------------------------------------------------------- Sevgili arkadaşlar Dewexpress Ribbon kullandım ondaki comboboxedit bu şekilde text ve data nasıl gönderebilirim. Ben bu mantığı normal comboboxta uyguluyorum tamam ama diğerinde listBox1.DisplayMember = "veri"; listBox1.ValueMember = "data"; DisplayMember,ValueMember yok Yardımlarınızı Bekliyorum Şurada https://social.msdn.microsoft.com/Forums/tr-TR/dcaf1b0e-7680-445d-9c97-27d558253263/devexpress-comboboxedit-datasource-zellii?forum=csharptr cmbmakinano.Properties.Items.AddRange(); gösterilmiş ama Properties özelliği yok. Edited July 13, 2015 by korasoglu Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 13, 2015 Share Posted July 13, 2015 DataBinding istiyorsanız lookUpEdit kontrolünü kullanabilirsiniz. lookUpEdit1.Properties.DisplayMember lookUpEdit1.Properties.ValueMember Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 13, 2015 Author Share Posted July 13, 2015 Sevgili kintaro lookUpEdit1. burası adı değilmi properties bu nesnede yokki yani diyelimki nesnemizin adı combo combo. dedikmi properties yok hata veriyor bunu denedim kendi sitesinde microsft örnekleri. nesnemizin ismi barEditItem1 kod tarafına geçince properties yok Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 13, 2015 Share Posted July 13, 2015 Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 14, 2015 Author Share Posted July 14, 2015 Hocam aşamalarımı size ulaştıracam yanlış giden bir şey var Bende sizdeki gibi olmuyor demekki eksik bir şey var. ---------------------------- C# merak sarınca herşeyi deniyorum yeni birşeyler öğreniyorum şöyle bir sorun yaşadım . çalıştır komutuyla bir dosya çalıştırdığımızda vaya kopyalatma işlemi yaptığımız sırada gif veya flash göstereceğim. fakat picturebox denedim işlem sırasında gif durdu flash denedim flash da durdu Thread yaptım işlemi ikiye ayırdım yine durdu. System.Windows.Forms.Form.CheckForIllegalCrossThreadCalls = false; Thread thread1 = new Thread(new ThreadStart(basla1)); thread1.Start(); Ben kullanıcıyı oyalamak adına ne yapabilirim benim açımdan C# nin eksikliği gözüküyor ama bunun bir yöntemi olması lazım çözümünüz nedir. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 14, 2015 Share Posted July 14, 2015 backgroundworker kullanın Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 14, 2015 Author Share Posted July 14, 2015 (edited) Evet araştırdım public Form1() { CheckForIllegalCrossThreadCalls = false; InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { backgroundWorker1.RunWorkerAsync(); } long toplam = 0; private void say() { for (int i = 0; i <= 100000; i++) { toplam += i; textBox1.Text = i.ToString(); } } private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { say(); } private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { //MessageBox.Show(toplam.ToString()); pictureBox1.Visible = false; } Fakat 10 saniye geçmeden fan şahlanmaya başlıyor. Ama aynı anda iki tane iş yapıyor. Edited July 14, 2015 by korasoglu Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 14, 2015 Share Posted July 14, 2015 ardı ardına 100.000 işlem yapıyor, bilgisayarınız yavaşsa fanın şahlanması normaldir. Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 14, 2015 Author Share Posted July 14, 2015 Sağolasın olayı anladım konu tamam başlatıp iptal edebiliyorum. Şu flashla ilgili soruma da cevap yazarsan harika olacak yatsı sonudan sahura kadar yaptığım şeyi tekrarlamak zorunda kalacam. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 14, 2015 Share Posted July 14, 2015 onu bilemedim ya, projeyi görmek lazim 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.