السلام عليكم ورحمه الله و بركاته
اما بعد فأود تغيير لون Row معين في DataGride في حدث Load على حسب قيمه معينه ، فيكن اتمكن من تغيير لون Row .
السلام عليكم ورحمه الله و بركاته
اما بعد فأود تغيير لون Row معين في DataGride في حدث Load على حسب قيمه معينه ، فيكن اتمكن من تغيير لون Row .
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
اخي الفاضل هل انت متاكد من ان الكود السابق يعمل لانك قد قمت بوضع متغير في الفور لوب غير المتغير الذي بداخل الفور لوب ، علاوه على ان dataGrid لايوجد لها من المثود الخاصه بها Row و Columns .
ارجو منك يا اخي الفاضل اما التاكد من الكود او ارسال كود موضوع فيه الكود الخاص بك يعمل .
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
لا الكود شغال ومية مية بس ينقص لة حبة توضيح
بالنسبة
tblFillGrid إسم الDataTable اللى أنا ماليتة من الDB
grdInfo إسم الDataGrid
//3 mean number of columns
for (int j = 0; j < 3; j++)
{
//change color of First row =>row[0]
grdInfo.Rows[0].Cells[j].Style.BackColor = System.Drawing.Color.Blue;
}اخي هل قمت بتجربه السطر
grdInfo.Rows[0].Cells[j].Style.BackColor
لانني جربته و لا يعمل لان dataGride لا يوجد لها خاصيه Row
هل يحتاج ان اضيف مكتبه او ان استخدم شي اضافي .
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
الRows property موجودة فى c#2.0
اقتباسGets a collection that contains all the rows in the DataGridView control
ودة مثال ب2003 Changing the background color of cells in a DataGrid
أخي eng_allam شكرا لك على ردودك
أنا أستعمل C1TrueDataGrid
لا بد أنك تعرفها............هل أستطيع تطبيق هذا الموضوع عليها؟ وكيف؟؟؟
أنا أيضا بحاجة للرد على هذا الموضوع فقد كنت أريد أن أسأل عنه لكن الاخ سبقني
اشكرك اخي eng_3llam على المجهود و يعطيك الله الف عافيه .
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
يا اخي اودت ان استفسر عن كيفيه وضع عنوان لل Data Gride في 2005 لانه في 2003 يوجد خاصيه CaptionText من خلالها تمكنك من وضع لل data gride وضع عنوان لها .
كيف اعمل ذلك في 2005 .
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
هل ممكن ان اعمل الطلب السابق في 2005 ام لا .
ارجو المساعده .
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
يا أخي , الـ DataGrid الموجوده في 2005 هي تماما نفسها الموجوده في الـ 2003 , وهم أصلا وضعوها في الـ 2005 كما هي تماما من أجل الـ Backward Campatibility ولذلك فمستحيل أنهم يكونوا غيروا فيها حاجات والا كان سيصبح اضافتها للـ 2005 مالوش لازمه , لأنه يوجد DataGridView وهي تقوم بنفس وظائفها بالاضافه الى مميزات.
يا اخي انا بحثت في 2005 عن المر المقابل في العمل للامر الموجود في الاسفل و لم اجد .
فما الامر الذي يلعب نفس الدور في dataGridView1 .
dataGrid1.CaptionText = "معلومات الفريق العربي";
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
هذا الموضوع مغلق.