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
4555
extra space characters removed when binding data to grid
posted

We use your grid to edit data for a database table.  The data in one of the columns can have data with multiple spaces between characters such as "aa  bb", two spaces between aa and bb.  It's important we retain exactly what the database stored.  But your grid is removing the extra space and show only "aa bb" after the datatable is bound to the grid.  The c# datatable does show the extra space just before binding, it's the grid that is removing it.  I've attached a sample project to demonstrate what I'm talking about.  Row "One" is supposed to have the value for "code" as "aa  bb" but instead it has "aa bb" being displayed.  Row "Two" has a value for "code" of "aa bb".  I realize this is a subtle difference but it makes a big difference for our clients.  Especially if the append a character to the end of the value we end up saving the new value without the extra space to our database and this causes problems.