View Full Version : سوال: ظاهر گرید ویو
htmbarnamenevisl
سه شنبه 13 بهمن 1388, 15:16 عصر
سلام
چطور میشه سطرهای دیتا گرید ویو رو به صورت یکی در میون رنگ کرد
یعنی سطر اول ابی رنگ باشه و سطر دوم زرد و سطر سوم دوباره ابی و ......
مرسی
aminh85
سه شنبه 13 بهمن 1388, 15:39 عصر
من که با این کد همیشه جواب می گیرم.
DataGridViewCellStyle objAlignRightCellStyle = newDataGridViewCellStyle();
objAlignRightCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
DataGridViewCellStyle objAlternatingCellStyle = new DataGridViewCellStyle();
objAlternatingCellStyle.BackColor = Color.WhiteSmoke;
grdAuthorTitles.AlternatingRowsDefaultCellStyle = objAlternatingCellStyle;
DataGridViewCellStyle objCurrencyCellStyle = new DataGridViewCellStyle();
objCurrencyCellStyle.Format = "c";
objCurrencyCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
htmbarnamenevisl
سه شنبه 13 بهمن 1388, 17:39 عصر
من دیتا گرید ویو رو به یک data table وصل کردم
می خوام فقط بعضی از ستونها به نمایش در بیان چیکار کنم
مرسی
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.