如何在datagridview vb 2010中删除数字之间的空格 [英] how to remove the space between number in datagridview vb 2010
问题描述
请问您有什么问题吗?我尝试了很多代码,但没有任何效果
要做的是删除电话栏中所有数字之间的空格
并删除零和左,我希望所有的数字都像这样,没有空格,或者像这样的0等于48802967,所以任何人都可以帮我编码的新手
please can you help i have this problem i tried a lot of code but nothing work
what want to do is to remove the space between all number in the column Tel
and remove the zero and left i want all number to be like this without space or 0 like this 48802967 so please can anyone help i'm new in coding
推荐答案
我不确定数据绑定DataGridView是否可行.
I'm not certain if that is possible for databound DataGridView.
否则,我怀疑您可以遍历每一行列的值并将其转换为字符串,然后删除我看不到的0处,并用任何空格替换所有空格,然后将值设置回转换后的字符串随便 值类型是phnr的类型.
Otherwise I suspect you could loop through the values of each rows column and convert them to string then remove wherever the 0 is which I don't see you showing and replace all spaces with nothing then set the value back to the string converted to whatever value type the phnr's are.
这篇关于如何在datagridview vb 2010中删除数字之间的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!