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
1059
Cell Leave Event
posted

Does ultragrid have something similar to CellLeaveEvent in datagrid?

my task to take in the value that the user inputs and format it accordingly.  For example:

if a user inputs 1500000, i want to retrieve this value and format to 1,500,000 and reinsert it back onto the cell. I have tried CellUpdate and CellChange but it doesn't seem to work the way i wanted.

Thanks

Joe

Parents
  • 4940
    Suggested Answer
    Offline posted

    In your first post the grid event you're looking for is called BeforeCellDeactivate. Here's a quick line of code that grabs the active cell's text.

     

    string celltext = ultraGrid1.ActiveCell.GetText(MaskMode.Raw);
    

    Are you storing these values as text when the user wants to save their entered data? The common practice is to use a formatting mask to present data/edit data. This way you can use the proper data types and format the data to how it should be displayed.

    The second post could be done by changing the Cursor property found in CellAppearance as shown below.

     

    ultraGrid1.DisplayLayout.Bands[0].Columns["YourColumnName"].CellAppearance.Cursor = Cursors.No;
    

     

Reply Children