开发者

adding characters into a datagrid in vb.net

开发者 https://www.devze.com 2023-01-08 01:35 出处:网络
I\'m开发者_开发问答 new to vb.net. I would like to know how i could i/p a string via textbox and display its individual characters into a datagrid view in diff rows?Are you only using a single column

I'm开发者_开发问答 new to vb.net. I would like to know how i could i/p a string via textbox and display its individual characters into a datagrid view in diff rows?


Are you only using a single column in the datagridview? if so you could do this easily by stepping through each character in the string and adding a row containing that character... see the code example below

InputString = TextBox1.Text
For a = 0 To InputString.Length - 1
    Datagridview1.Rows.Add(InputString(a))
Next

Cant see why you'd want to do this though - If this isn't what you're trying to accomplish please give us more details

0

精彩评论

暂无评论...
验证码 换一张
取 消