MySQL Forums
Forum List  »  Newbie

Re: Cannot load RTF stored in database to richtextbox properly
Posted by: Denis Valjean
Date: May 27, 2014 08:21AM

Thanks Phill for your advices. I will follow them, for sure.

I changed .Text to .RTf and it says "invalid file format". I am displaying the richtextbox content after clicking a row in datagrid that has table contents. Here is the code:

------------------------------------------
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{

if (e.RowIndex >= 0)
{

DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex];

// richTextBox1.Rtf = row.Cells["texto"].Value.ToString();
}
}
-------------------------------------------

"texto" is the field that stores the Rtf string. Why "invalid file format"?

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.