This is a migrated thread and some comments may be shown as answers.

Setting RadGridView Column width to "*" causes an error

6 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rabeeh
Top achievements
Rank 2
Rabeeh asked on 23 Feb 2011, 12:04 PM
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.

6 Answers, 1 is accepted

Sort by
0
Joseph
Top achievements
Rank 1
answered on 24 Feb 2011, 01:21 PM
Any Suggestions guys ?
0
Yordanka
Telerik team
answered on 24 Feb 2011, 04:31 PM
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!
0
Rabeeh
Top achievements
Rank 2
answered on 25 Feb 2011, 09:27 AM
<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>
0
Rabeeh
Top achievements
Rank 2
answered on 25 Feb 2011, 09:28 AM
If you set the Columns width to *, the error will occur .
0
Yordanka
Telerik team
answered on 25 Feb 2011, 11:58 AM
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!
0
Rabeeh
Top achievements
Rank 2
answered on 25 Feb 2011, 04:07 PM
I set the minHeight of the Control inside the Column and it works now.

Tags
GridView
Asked by
Rabeeh
Top achievements
Rank 2
Answers by
Joseph
Top achievements
Rank 1
Yordanka
Telerik team
Rabeeh
Top achievements
Rank 2
Share this question
or