This question is locked. New answers and comments are not allowed.
Hi
I am not sure whether i am using the correct control or not. Basically, I want to use a control which will let the user realize that they type something wrong and suggest the correct answer. And radrichtextbox is the only control which i knows so far (tried spellCheck and that one doesn't work very nicely during opening multiple radwindow levels).
basically, i have Customer table which have the fields
CustomerId, customerName, customerComment (string)
that customer collection will be bounded to the radgridview . And inside my radgridview will have an unbound column which contain a radbutton. When i click on that button , a pop-up radwindow which contains the RadRichTextBox will appear and let me modify the CustomerComment field
I read your online document and example and only see that the radrichtextbox will accept a Document type for its content (not a string type). In my case, i only have a string field.
------->
so what i did is that , i create a Document on the fly . That document will have one paragraph. Inside that paragraph will have a span element . The way i did that is because i ONLY know that the span element will have the TEXT property which will let me set span.Text = customerComment.
And after user modify the content in the richTextBox, i will search for that span element in the RichTextBox and retrieving that TEXT property in order to update my customerComment.
I do know that my solution is kind of awkward. But i can't really find a way to use the radrichtextbox in order to let user see my customerComment ----> then modify it (having spellcheck) -----> then update that modified content to my CustomerComment field
My Question: can you suggest a proper way to accomplish my task : "having spellcheck during type CustomerComment field" (it is not a Document type it is just a string type)
Any control is fine. There is no need to radrichtextbox. A normal textbox is fine but it must have spell check (but not forcing the user to click on a button which ask for spellCheck like the one in your demo of SpellChecker). It should spellcheck automatically.
Note; with my current solution for the RichTextBox. It does take SOME TIME in order to pop-up the comment Radwindow when the button has been clicked. I don't really know why it takes too long (around 6-7 second waiting) to let the window pop-up.
A snippet of my awkward solution
thanks
I am not sure whether i am using the correct control or not. Basically, I want to use a control which will let the user realize that they type something wrong and suggest the correct answer. And radrichtextbox is the only control which i knows so far (tried spellCheck and that one doesn't work very nicely during opening multiple radwindow levels).
basically, i have Customer table which have the fields
CustomerId, customerName, customerComment (string)
that customer collection will be bounded to the radgridview . And inside my radgridview will have an unbound column which contain a radbutton. When i click on that button , a pop-up radwindow which contains the RadRichTextBox will appear and let me modify the CustomerComment field
I read your online document and example and only see that the radrichtextbox will accept a Document type for its content (not a string type). In my case, i only have a string field.
------->
so what i did is that , i create a Document on the fly . That document will have one paragraph. Inside that paragraph will have a span element . The way i did that is because i ONLY know that the span element will have the TEXT property which will let me set span.Text = customerComment.
And after user modify the content in the richTextBox, i will search for that span element in the RichTextBox and retrieving that TEXT property in order to update my customerComment.
I do know that my solution is kind of awkward. But i can't really find a way to use the radrichtextbox in order to let user see my customerComment ----> then modify it (having spellcheck) -----> then update that modified content to my CustomerComment field
My Question: can you suggest a proper way to accomplish my task : "having spellcheck during type CustomerComment field" (it is not a Document type it is just a string type)
Any control is fine. There is no need to radrichtextbox. A normal textbox is fine but it must have spell check (but not forcing the user to click on a button which ask for spellCheck like the one in your demo of SpellChecker). It should spellcheck automatically.
Note; with my current solution for the RichTextBox. It does take SOME TIME in order to pop-up the comment Radwindow when the button has been clicked. I don't really know why it takes too long (around 6-7 second waiting) to let the window pop-up.
A snippet of my awkward solution
//Create Document for RadRichTextBox RadDocument document = new RadDocument(); Telerik.Windows.Documents.Model.Section section = new Telerik.Windows.Documents.Model.Section(); Telerik.Windows.Documents.Model.Paragraph paragraph = new Telerik.Windows.Documents.Model.Paragraph(); //Setting the value of the comment to richTextBox Telerik.Windows.Documents.Model.Span span = new Telerik.Windows.Documents.Model.Span() { Text = selectedTBDocumentLine.CustomerComment }; paragraph.Inlines.Add(span); section.Children.Add(paragraph); document.Sections.Clear(); document.Sections.Add(section); ///// commentScreen.commentRTB.Document = document; commentScreen.Closed += new EventHandler<WindowClosedEventArgs>(commentScreen_Closed); commentScreen.ShowDialog(); } void commentScreen_Closed(object sender, WindowClosedEventArgs e) { (sender as RadWindow).Closed -= commentScreen_Closed; if (commentScreen.Header == "Customer Comment") { // update the customerComment through the content of the radrichtextbox selectedTBDocumentLine.CustomerComment = (commentScreen.commentRTB.Document.Sections.First.EnumerateChildrenOfType<Telerik.Windows.Documents.Model.Paragraph>().First().Inlines.First as Telerik.Windows.Documents.Model.Span).Text; //selectedTBDocumentLine.CustomerComment = commentScreen.commentTB.Text; autoSave(); }thanks
