4 Answers, 1 is accepted
0

Emanuel Varga
Top achievements
Rank 1
answered on 05 Jun 2011, 09:38 AM
Hello,
Have you set the AutoSizeColumnsMode to Fill?
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
Have you set the AutoSizeColumnsMode to Fill?
radGridView.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
Hi Saikiran,
If this solution does not fit your requirements, please share with us the way you have initialized the RadGridView control.
Svett
the Telerik team
You can customize the sizing behavior of columns' headers by setting the AutoSizeColumnsMode to GridViewAutoSizeColumnsMode.Fill :
this
.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
If this solution does not fit your requirements, please share with us the way you have initialized the RadGridView control.
All the best,
Svett
the Telerik team
0

Saikiran
Top achievements
Rank 1
answered on 08 Jun 2011, 06:28 AM
Hi,
Thanks.
And next I want to change the alternate color of the Rows in Grid View.
Actually in Windows forms ,we can achieve it by set the properties in following way
but i didn't find any such type of properties in Telerik.
Can u give any idea.
Thanks & Regards
Saikiran
Thanks.
And next I want to change the alternate color of the Rows in Grid View.
Actually in Windows forms ,we can achieve it by set the properties in following way
GridView.AlternatingRowsDefaultCellStyle.ForeColor = Color.White;
GridView
.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(41, 41, 41);
GridView
.AlternatingRowsDefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(66, 66, 66);
GridView
.AlternatingRowsDefaultCellStyle.SelectionForeColor = Color.White;
Can u give any idea.
Thanks & Regards
Saikiran
0
Hi Saikiran,
If you want to change the alternating background row color, you should set the AlternatingRowColor property:
If you want to customize the foreground color, you should use the CellFormatting event in this way:
I hope this helps. Regards,
Svett
the Telerik team
You should enable the row alternating color by setting the EnableAlternatingRowColor property:
this
.radGridView1.EnableAlternatingRowColor =
true
;
If you want to change the alternating background row color, you should set the AlternatingRowColor property:
this
.radGridView1.TableElement.AlternatingRowColor = Color.Red;
If you want to customize the foreground color, you should use the CellFormatting event in this way:
void
radGridView1_CellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.Row.IsOdd)
{
e.CellElement.ForeColor = Color.Yellow;
}
else
{
e.CellElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
}
}
I hope this helps. Regards,
Svett
the Telerik team