I'm trying to create a DataForm that uses a RichTextBox as one of the entry fields. My problem comes in when I try to programmatically set the binding of the RichTextBox. Here's what I have:
(Comments is a string variable)
I'm not quite sure what to use for the dependency property - any suggestions?
private
void
editCabinetForm_AutoGeneratingField(
object
sender, Telerik.Windows.Controls.Data.DataForm.AutoGeneratingFieldEventArgs e)
{
if
(e.PropertyName ==
"CabinetName"
)
{
e.DataField.Label =
"Cabinet Name"
;
}
else
if
(e.PropertyName ==
"BriefDescription"
)
{
e.DataField.Label =
"Brief Description"
;
}
else
if
(e.PropertyName ==
"Comments"
)
{
RadRichTextBox commentsBox =
new
RadRichTextBox();
//commentsBox.SetBinding(???, new Binding("Comments"));
e.DataField.Content = commentsBox;
e.DataField.Label =
"Comments"
;
}
else
{
e.Cancel =
true
;
}
}
(Comments is a string variable)
I'm not quite sure what to use for the dependency property - any suggestions?