Copy Excel data to Rich Text + delete grid

I am trying to copy data from an excel sheet into a rich text box in a Winform.NET project.

Grid lines are appearing right now in a rich text box. How to remove grid lines from a rich text box.

Because I do not want to show grid lines in the rich text box.

Please help me

Thanks Sandeep

+3
source share
2 answers

you can do this in the keydown event from your richtextbox (if you use the regular paste method)

        private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control == true && e.KeyCode == Keys.V)
            {
                e.Handled = true;
                string st = Clipboard.GetText();
                richTextBox1.Text = st;
            }
        }

hope this helps

+3
source

. , Clipboard, nUnit, null. nUnit [RequiresSTA] .

[TestFixture, RequiresSTA].

: fooobar.com/questions/138178/...

+1

Source: https://habr.com/ru/post/1786555/


All Articles