Setting RadGridView Column width to "*" causes an error

7 posts, 0 answers
  1. Rabeeh
    Rabeeh  avatar
    62 posts
    Member since:
    Sep 2007

    Posted 23 Feb 2011 Link to this post

    Hi guys,

    I have a RadGridView located inside a Grid Control.

    The RadGridView consists of 2 columns, each column contains a RadRichtextBox.

    When I set the width to * for both columns I get the following error :

    The type initializer for Telerik.Windows.Documents.Layout.RadTextMeasure  threw an exception.
     
    How can I set both columns to fit the screen equally ?

    Thanks.
  2. Joseph
    Joseph avatar
    135 posts
    Member since:
    Sep 2007

    Posted 24 Feb 2011 Link to this post

    Any Suggestions guys ?
  3. DevCraft banner
  4. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 24 Feb 2011 Link to this post

    Hi,

    Could you specify how the columns are defined ?
     
    Kind regards,
    Yordanka
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Rabeeh
    Rabeeh  avatar
    62 posts
    Member since:
    Sep 2007

    Posted 25 Feb 2011 Link to this post

    <telerik:RadGridView x:Name="gridHoriz"  ShowColumnHeaders="False" ScrollMode="Deferred" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False"  ShowGroupPanel="False"             
                           AutoGenerateColumns="False">
              <telerik:RadGridView.Columns>
     
                  <telerik:GridViewDataColumn Header="Source" DataMemberBinding="{Binding SegmentNumber, Mode=TwoWay}" Width="500" >
                      <telerik:GridViewDataColumn.CellTemplate >
                          <DataTemplate>
     
                              <GVControls:GVRichTextBoxCtrl 
                                  MergeEnabled="{Binding MergeEnabled, Mode=TwoWay}"
                                  IsSelected="{Binding IsSelected, Mode=TwoWay}"  
                                  SegmentText="{Binding Text, Mode=TwoWay}" 
                                  SegmentNumber="{Binding SegmentNumber, Mode=TwoWay}" 
                                  SegmentType="source" >
                              </GVControls:GVRichTextBoxCtrl>
     
     
     
                          </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate  >
     
                  </telerik:GridViewDataColumn>
     
                  <telerik:GridViewDataColumn Header="Target" Width="500" DataMemberBinding="{Binding SegmentNumber, Mode=TwoWay}"   >
                      <telerik:GridViewDataColumn.CellTemplate  >
                          <DataTemplate>
     
                              <GVControls:GVRichTextBoxCtrl
                                  TagsMode="{Binding TagsMode, Mode=TwoWay}"
                                  IsAutoComplete="{Binding IsAutoComplete, Mode=TwoWay}"
                                  SegmentTranslationStatusColor="{Binding SegmentTranslationStatusColor, Mode=TwoWay}"
                                  SegmentPercentage="{Binding SegmentPercentage, Mode=TwoWay}"
                                  SegmentStatus="{Binding SegmentStatus, Mode=TwoWay}"
                                  SpecificSegmentSelectedEvent="box_SpecificSegmentSelectedEvent"
                                  IsSelected="{Binding IsSelected, Mode=TwoWay}"
                                  SegmentText="{Binding Text, Mode=TwoWay}"  
                                  SegmentType="target"
                                  IsTranslated="{Binding IsTranslated, Mode=TwoWay}"
                                   
                                  >
     
                              </GVControls:GVRichTextBoxCtrl>
     
     
                          </DataTemplate>
                      </telerik:GridViewDataColumn.CellTemplate  >
     
     
                  </telerik:GridViewDataColumn>
     
              </telerik:RadGridView.Columns>
          </telerik:RadGridView>
  6. Rabeeh
    Rabeeh  avatar
    62 posts
    Member since:
    Sep 2007

    Posted 25 Feb 2011 Link to this post

    If you set the Columns width to *, the error will occur .
  7. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 25 Feb 2011 Link to this post

    Hello Rabeeh ,

    We couldn't reproduce your case because of the missing information. Is GVRichTextBoxCtrl your custom RichTextBox which is inherited from RadRichTextBox ? 
    Is it possible to send a sample project so that we will be able to see and debug the problem ? You can do this by opening a separate support ticket. Thank you.
     
    Regards,
    Yordanka
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  8. Rabeeh
    Rabeeh  avatar
    62 posts
    Member since:
    Sep 2007

    Posted 25 Feb 2011 Link to this post

    I set the minHeight of the Control inside the Column and it works now.

Back to Top
DevCraft banner