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
175
Get a cell
posted

I have this grid below.  I have re-labeled the Bands and columns for sensistive data.  I need to get a cell value and/or cell attributes.  I have the UltraGridRow "gr" and UltraGridColumn "gc" coming into my method.

How do I get the cell?

Thanks,

 

Parents
No Data
Reply
  • 45049
    Suggested Answer
    posted

    Given that "gr" is your UltraGridRow object and "gc" is your UltraGridColumn object, the following code will give you a reference to the cell where the row and column meet:

    using Infragistics.Win.UltraWinGrid;
    ...
    UltraGridCell gcell = gr.Cells[gc];

    You could instead pass in the Key of the desired UltraGridColumn object to the indexer of the Cells collection.  Using the key is the most typical use case that I see.  Since you already have the column in the scenario you've described, you may as well use it.

Children