Hi
I have a grid in which some columns are of dropdown style , I am not able to set the focus on a particular Cell .Any property of the Grid I can use to achieve the same.Any Inputs for the same .
The Second issue is Whenever I am painting the grid on my Windows form and Run the window form with the data filled .I Get some extra space between the last column and the grid''s width in total.Is not there any stretch property of the grid which can be used to make the size of the grid same as that of the width of the columns.
Thanx n Regards
Lokesh Luthra
AD
Administrator
Syncfusion Team
May 14, 2004 06:07 AM UTC
1) Check the style.Enabled property of the dropdown cell. If this is false, you will not be able to make it the currentcell. If that is not it, then can you post a sample project showing the problem, or tell us how to see it in one of our samples?
2) Currently, there is no property that will allow th egrid to fill the client area. If you want this behavior, one way is to dynamically size the right-most column to fill up any empty space. This will let the default sizing (or explicit sizing if you want it) work for the other columns. You do this in QueryColWidth. Here is a forum link that discusses this.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=2699
If you want all columns to grow and contract as you size the grid, you can also do this in QueryColWidth. The Grid\Samples\DataBound\GridDataBoundImageCell has code that does this.
LL
Lokesh Luthra
May 17, 2004 06:39 AM UTC
Hi Clay
thanx for your reply , Yes the style.enabled property is true for the same but still not able to set the focus/Cursor.Since I know the the subscript of the cell where I have to set the focus for example Grid.Item(2,3) i.e I want to set the focus on the 2nd row and the third column cell of the grid.
Regards
Lokesh Luthra
>1) Check the style.Enabled property of the dropdown cell. If this is false, you will not be able to make it the currentcell. If that is not it, then can you post a sample project showing the problem, or tell us how to see it in one of our samples?
>
>2) Currently, there is no property that will allow th egrid to fill the client area. If you want this behavior, one way is to dynamically size the right-most column to fill up any empty space. This will let the default sizing (or explicit sizing if you want it) work for the other columns. You do this in QueryColWidth. Here is a forum link that discusses this.
>
>http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=2699
>
>If you want all columns to grow and contract as you size the grid, you can also do this in QueryColWidth. The Grid\Samples\DataBound\GridDataBoundImageCell has code that does this.
AD
Administrator
Syncfusion Team
May 17, 2004 07:21 AM UTC
You set the currentcell by calling grid.CurrentCell.MoveTo(rowIndex, colIndex). This should normally work, but in some event handlers (where you are in the middle of moving the currentcell already), this call may not be allowed. In such cases, there is generally another event you can use to set the currentcell somehow, but it depends upon exactly what you are doing. If CurrentCell.MoveTo does not do what you need, can you post a little sample project showing what you want to do?