تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
طلب تعديل لكود بسيط خاص بتعبئة كومبوبوكس في الجريدفيو
#1
السلام عليكم
الكود كالتالي
كود :
string unitid = dt_1.Rows[0][0].ToString();
                   DataTable dt_ex_date = CL_DBManager.SelectCmdText("select case when expired_date is null then 'لايوجد تاريخ صلاحية' else  convert (varchar(10),  expired_date ,103)end as expired_date,product_id,total_balance    from dbo.Purchase_Invoice  where Unit_ID=" + unitid + " and total_balance>0  ");





                   DataGridViewComboBoxCell dccb = new DataGridViewComboBoxCell();

                   dccb.DataSource = dt_ex_date;
                   dccb.DisplayMember = "expired_date";  // using the same field..
                   dccb.ValueMember = "product_id";  // .. as I have only one
                   int nRowIndex = dataGridView1.Rows.Count - 1;
               
                   //  dataGridView1.CurrentRow.Cells["ss"] = dccb;
                   dataGridView1.Rows[nRowIndex].Cells["ss"] = dccb;
[url=http://al3aby4yy.com/][/url]
المفترض انه كل تاريخ صلاحية في الصورة له الكود الخاص به(product_id)
ما يحدث هنا مهما كان اختيارك لو تاريخ الصلاحية مطابق يتم اختيار product_id لتاريخ الصلاحية الاول في جميع الاختيارات

المطلوب معالجة هذه المشكلة
شكراً مقدماً
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
طلب تعديل لكود بسيط خاص بتعبئة كومبوبوكس في الجريدفيو - بواسطة Darel - 21-02-17, 01:55 AM


التنقل السريع :


يقوم بقرائة الموضوع: