MystiqueOfLife
Programmer
Hello,
This is a question on a GridView.
When storing data in a cell, no data gets set with a value of "nbsp;".
For example, an add form inserts data into a GridView, not all fields in the form contain value, so some GridView columns contain no data, but still for some reason hold a " " value. You notice this when you extract the GridView data to work with it.
To remove the "nbsp;" you do this:
lblData.Text = oGridView.Rows[0].Cells[0].Text.Replace(" ", "");
There must be a better way... I find it odd that you cannot tell the GridView to just store "" inside its cell when no data is passed into that cell.
Any other methods? Thanks appreciate it.
This is a question on a GridView.
When storing data in a cell, no data gets set with a value of "nbsp;".
For example, an add form inserts data into a GridView, not all fields in the form contain value, so some GridView columns contain no data, but still for some reason hold a " " value. You notice this when you extract the GridView data to work with it.
To remove the "nbsp;" you do this:
lblData.Text = oGridView.Rows[0].Cells[0].Text.Replace(" ", "");
There must be a better way... I find it odd that you cannot tell the GridView to just store "" inside its cell when no data is passed into that cell.
Any other methods? Thanks appreciate it.