Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
38
Ultra grid related issues
posted

Hi, 

I am using ultra grid and want to do following thing with it.

  1. Select cells programmatically based on current cell clicked.(I need this so that cell's appearance would be same as clicked cell)

           can someone tell me how to do this? e.g. user clicks on grid (i can capture grid's click event, but there is no cell click event). I need to findout how to get the cell from the mouse's click

 

2. I am adding columns programmatically, and binding grid to datasource (DataSet). I need to know what propery should be set so that grid would not show columns other than what I have setup?

3. I am creating various appearances my self and assigning while creating columns, however, after binding the grid, it does not apply those appearances. Is there a right or wrong way to do this?

 please let me know... snippets or direction to documentation having samples would be agreat help!!!

Thanks  in advance

  • 990
    posted

    Hi,

    Provided you haven't changed the default behaviour of the grid you can obtain the cell clicked from the BeforeCellActivate. If you have prevented cell's from becoming active then you may need to resort to the UltraGrid.DisplayLayout.UIElement.ElementFromPoint method and determine the cell from there.

    When binding programmatically you can use the UltraGrid.SetDataBinding method and set the hideNewColumns parameter to true. Alternatively, at design time, you can set the UltraGrid.DisplayLayout.NewColumnLoadStyle to Hide.

    Appearances are inherited and often it can be difficult to determine where they are coming from. If you are using the AppStylist then you can try changing the ResolutionOrder so the Control can override the Application. Alternatively, set the UseAppStyling property of the grid to False. You may also need to change the UseOSThemes property depending on the appearance you are trying to achieve.

    Hope some of this helps or points you in the right direction.

    Andy.