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
520
AppStylist with Infragistics Grids
posted

I have several different types of Grids in my application.  Some display data rows from which the user choosers a row,  Others are simply for display - there is nothing to select.  Others allow the user to edit data in the grid.  Some allow single row selection.  Some allow multiple row selection.  Some have one column of data that can be edited, etc.

I can't seem to find a way to define my color theme to display colors logically to a user in all these cases.  What do you suggest?

Is there a way to define multiple color "themes" for a grid within the same theme?

An example of a need for a difference is with defining hover and selected colors.

If not, how do you suggest this be handled.  I currently have a grid that displays multiple rows of data.  Each row has a trashcan icon that when clicked will cause the row to be deleted.  The user can also select multiple rows and press a button to delete those rows.

The theme defines a hover color for cells in the grid and also selected colors, which looks great for other grids, but looks weird with this grid since data can not be edited. 

One possible solution I can think of is to create multiple classes derived from the UltraGrid and style them independently.  Does the AppStylist allow for the styling of these sort of classes?

If not, what do you suggest?

Andy

Parents
No Data
Reply
  • 28670
    Offline posted

    Hello Andy,

    I have been investigating into your requirement in this case, and there are a few ways that this can be handled. It is first worth noting that by using AppStylist, you can define a style for each of the states of the grid – that is, for selection, hover, active, and a normal state by modifying the Normal, Selected, HotTracked, and Active states of the row styles.

    If you need multiple styles within the same .isl, I would recommend potentially using Resources, which you can read about here. You can then apply those Resources by using the StyleResourceName property of the various Appearance objects that are applied to the grid.

    Another thing you can do is create UserControls for the grids that you wish to have styled separately and then load your own .isl local to that UserControl. Alternatively, creation of a derived UltraGrid will be styled by AppStylist, but you will need to still write the actual style for UltraGrid to have it applied – there is no UI canvas for styling a custom-derived control.

    Please let me know if you have any other questions or concerns on this matter.

Children
No Data