Hi,
Thanks for your help. But I dont want to change the height of the Grid if the records is more then it should show the Vertical Scroll bar.
Regards
Rajesh
>I am not sure how you are setting up your GridControl.RowCount property and how you are getting your Datatable data into the GridControl. So, I can only suggest the properties that you can use to do something like this. Whether they will work in your particular situation, I do not know.
>
>Here is a code snippet showing how you can set the grid''s client height to be exactly the header rows plus 10 default rows high. For this to work the grid''s height cannot be constrained (like the being docked.Fill or having top and bottom anchored). The snippet also shows how to display empty rows in the clientarea.
>
>
>private void Form1_Load(object sender, System.EventArgs e)
>{
> this.gridControl1.ColCount = 7;
> this.gridControl1.RowCount = 5;//22;
> int h = this.gridControl1.RowHeights.GetTotal(0, this.gridControl1.Rows.HeaderCount)
> + 10 * this.gridControl1.DefaultRowHeight;
> this.gridControl1.ClientSize = new Size(this.gridControl1.ClientSize.Width, h);
> this.gridControl1.Model.Options.DisplayEmptyRows = true;
>}
>