1) create MVVM app.
2) Send the first page of data. Radgridview expands as needed
2) send the second page of data. Radgridvew columns are still expanded although some columns contains no data or contains data which are short (narrow)
Thanks tom
9 Answers, 1 is accepted
Thank you for reporting this!
We are aware of similar issue, which has been already logged in our PITS System. I believe that it is related to the described one and you may track its progress from the following link. I would encourage you to vote, which will increase its priority.
Please excuse us for any inconvenience caused!
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
Will you try to isolate the problem in a small runnable project and sent it to us in a new support ticket where we can see what might be wrong? We may take a look at it and we will do our best to provide you with an appropriate solution. Any additional information about the grid version you used will be highly appreciated as well.
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I am using 2011.1.315.1040 version.
<
Grid
Grid.Column
=
"2"
Width
=
"500"
>
<
telerikGrid:RadGridView
Grid.Column
=
"0"
x:Name
=
"gwFolderContent"
ItemsSource
=
"{Binding FolderContent,Mode=OneWay}"
CanUserDeleteRows
=
"False"
CanUserInsertRows
=
"False"
CanUserResizeColumns
=
"False"
IsReadOnly
=
"True"
AutoGenerateColumns
=
"False"
SelectionChanged
=
"gwFolderContent_SelectionChanged"
GridLinesVisibility
=
"None"
ShowGroupPanel
=
"False"
RowIndicatorVisibility
=
"Collapsed"
GotFocus
=
"gwFolderContent_GotFocus"
LostFocus
=
"gwFolderContent_LostFocus"
RowActivated
=
"gwFolderContent_RowActivated"
Width
=
"auto"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
ColumnWidth
=
"auto"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"File Name"
DataMemberBinding
=
"{Binding Name}"
Width
=
"Auto"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"{Binding FileImgName,Converter={StaticResource prefixStringConverter},ConverterParameter='/images/fileSystem/small/'}"
Stretch
=
"None"
/>
<
TextBlock
Text
=
"{Binding Name}"
Margin
=
"4,0,0,0"
VerticalAlignment
=
"Center"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Title"
DataMemberBinding
=
"{Binding Csc.Title}"
Width
=
"Auto"
/>
<
telerik:GridViewDataColumn
Header
=
"Attributes"
DataMemberBinding
=
"{Binding Csc.Attributes}"
Width
=
"Auto"
/>
<
telerik:GridViewDataColumn
Header
=
"XML Element"
DataMemberBinding
=
"{Binding Csc.XmlElementName}"
Width
=
"SizeToCells"
/>
<
telerik:GridViewDataColumn
Header
=
"Operation"
DataMemberBinding
=
"{Binding Operation}"
Width
=
"Auto"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Image
Source
=
"{Binding Csc.SelectedOperationImgName,Converter={StaticResource prefixStringConverter},ConverterParameter='/images/icons16x16/'}"
Stretch
=
"None"
ToolTipService.ToolTip
=
"{Binding Csc.SelectedOperation}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Modified File"
DataMemberBinding
=
"{Binding Csc.ModifiedFilePath}"
MinWidth
=
"100"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
HyperlinkButton
Content
=
"{Binding Csc.ModifiedFilePath}"
NavigateUri
=
"{Binding Csc.ModifiedFileUrl}"
TargetName
=
"_blank"
VerticalAlignment
=
"Center"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Modified File Title"
DataMemberBinding
=
"{Binding Csc.ModifiedTitle}"
MinWidth
=
"100"
/>
</
telerik:RadGridView.Columns
>
</
telerikGrid:RadGridView
>
</
Grid
>
I am sending data to gvFolderContentGrid grid (that 500 px wide frame is useless, just for testing). Every new page of data only makes some columns a little bit wider in case that data cannot fit. Columns never shrink to more narrow. Do you understand to my problem?
Also I would like to know, why the grid is not painted all. You can see on the attached picture, that the footer of the grid is missing.
Please excuse my poor english.
Thank you very much.
Tom
I believe that it would be useful to explain how the GridViewDataColumn's Width property works:
Auto | Auto (Default Value) | Automatically fits the size according to content |
Fill | Star ("*") | Fills the available space |
SizeToHeader | Column width is equal to the width of the header cell | |
SizeToCells | Column width is equal to the width of the widest (excluding header) cell | |
# pixels | Sets fixed column width size |
You may also try to set the Width property of a column to SizeToCells, in this way the column width would be equal to the width of the widest (excluding header) cell as described above.
Regarding your second question, the problem is related to the RadGridView's grid lines. You have simply removed the gridlines and the rowindicator, however the FrozenIndicator is still visible.
Then you may notice this "gap". This is the remaining space of the Grid when the grid rows do not fill the vertical available space. I would suggest you to remove it through setting the CanUserFreezeColumns property of RadGridView to False.
Kind regards,
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I have already tested this settings (SizeToCells). Columns will never shrink back to more narrow when next page of data contains shorter strings.
Thank you.
Tom
Sorry for the late reply. We have spent some time to investigate your case and you are right. Your case is related to a bug, which has been already logged in our PITS System. You may track its progress either by ID(1630) or following this link. I would encourage you to vote and in this way you will affect its priority.
Once again please excuse us for any inconvenience caused!
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Please, is there any way how to publish data according to MVVM model (it means pages of data) in such way to be always visible? = not only expand columns but also shrink them?
Any html table can do this...
Thank you.
Tom
Just wanted to know if this issue was fixed, from where should I update my DLLs?