Text Dataprovider and FlowLayout

2 posts, 0 answers
  1. Christian Moravek
    Christian Moravek avatar
    2 posts
    Member since:
    Feb 2010

    Posted 15 Mar 2011 Link to this post

    Hi

    I am using the Richtextbox with Dataproviders, a ViewModel and Html and text properties on it. If I use the HTML-Dataprovider, the result will be rendered automatically in flow layout and everthing is fine.

    If I use a text property on my view model with the Text-Dataprovider, then the rendered result is a paged layout with blue background.

    I have also set the the LayoutMode on the RadDocument to "Flow" in my xaml-File. But ist seems, that this will be overridden from the Dataproviders.

    Any suggestions to get flow layout with Text values and the Text-Dataprovider. Maybe I am missing something...

    btw, if I use the Text Property with the HTML-Dataprovider then the result is also a flow layout, but i am not sure if the formatting will be correct with some text content. That is why I want to use the Text-Dataprovicer.

    Edit: I tried the HTML Dataprovider with a larger, formatted (line breaks) Text document and the formatting gets lost.

    Regards
    Christian
  2. Ivailo Karamanolev
    Admin
    Ivailo Karamanolev avatar
    276 posts

    Posted 17 Mar 2011 Link to this post

    Hi Christian Moravek,

    You can use the TxtDataProvider with whichever layout mode you like. All you have to do is attach to the SetupDocument event of the data provider and customize the document (e.g. set the layout mode to flow). You can also change any other document setting this way.
    Let us know if you need additional assistance.

    Regards,
    Ivailo
    the Telerik team
Back to Top