We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

QueryCellFormattedText

Thread ID:

Created:

Updated:

Platform:

Replies:

24526 Feb 5,2005 10:01 PM UTC Feb 10,2005 02:48 AM UTC WinForms 2
loading
Tags: GridControl
Ken Law
Asked On February 5, 2005 10:01 PM UTC

I''ve written QueryCellFormattedText and SaveCellFormattedText handlers to format a uint to/from hexidecimal format. I ran into problems because although there is only 1 row in the grid, my handler is called with row==0, row==1, row==2. Can you tell my why? Here''s my code: private void dbgBoardsModel_QueryCellFormattedText(object sender, GridCellTextEventArgs e) { int row = e.Style.CellIdentity.RowIndex; int col = e.Style.CellIdentity.ColIndex; if (col == iBoardBaseAddressColIndex) { try { uint ui = (uint) e.Value; e.Text = ui.ToString("x"); } catch (Exception ex) { string str = ex.Message; } e.Handled = true; } }

Administrator [Syncfusion]
Replied On February 6, 2005 08:10 PM UTC

Ken, row 0 is the row with column headers. row 1 is your first row with data. row 2 is the AddNew row. Stefan >I''ve written QueryCellFormattedText and SaveCellFormattedText handlers to format a uint to/from hexidecimal format. I ran into problems because although there is only 1 row in the grid, my handler is called with row==0, row==1, row==2. Can you tell my why? Here''s my code: > >private void dbgBoardsModel_QueryCellFormattedText(object sender, GridCellTextEventArgs e) >{ > int row = e.Style.CellIdentity.RowIndex; > int col = e.Style.CellIdentity.ColIndex; > if (col == iBoardBaseAddressColIndex) > { > try > { > uint ui = (uint) e.Value; > e.Text = ui.ToString("x"); > } > catch (Exception ex) > { > string str = ex.Message; > } > e.Handled = true; > } >}

Ken Law
Replied On February 10, 2005 02:48 AM UTC

Thanks - makes sense.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;