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
639
Make UltraGrid able to work like excel
posted

Hi all,

I have a new task that need to display out a report in grid with few column of data, then allow user direct fill in the data like using excel. the grid should be able to move to next cell by clicking the arrow keys in keyboard, and user can direct key-in the value. May I know is it any function of infragistic able to customize like this?

Please guide.

Thank you very much!

Parents
No Data
Reply
  • 20
    posted

    maybe u can try to add this code at Keys.Up and Key.Down

    Key.Up
    int activeCellidx = ultragrid.ActiveCell.Column.Index;
    if (ultragrid.ActiveRow.Index > 0)
    {
    ultragrid.ActiveRow = ultragrid.Rows[ultragrid.ActiveRow.Index - 1];
    ultragrid.ActiveCell = ultragrid.ActiveRow.Cells[activeCellidx ];
    }


    Keys.Down
    if (ultragrid.ActiveRow.Index < ultragrid.Count-1)
    {
    ultragrid.ActiveRow = ultragrid.Rows[ultragrid.ActiveRow.Index + 1];
    ultragrid.ActiveCell = ultragrid.ActiveRow.Cells[activeCellidx];
    }


Children