Telerik Forums
UI for WPF Forum
1 answer
202 views
Columns are not cannot be re-sized beyond grid width when at least one column has Width set to *. This is not the behavior that I would expect and in my opinion it makes the * option almost useless because as soon as you use it, resizing columns behaviors awkwardly where the grid always tries to maintain a static total width and steals the width from other existing columns when a column is made wider.

<Window x:Class="TelerikRadGridViewTest.MainWindow"
        Title="MainWindow"
        Height="350"
        Width="525">
    <Grid>
        <telerik:RadGridView Name="grdEstimates"
                             Margin="5,1,0,0"
                             ShowGroupPanel="False"
                             IsFilteringAllowed="False"
                             AutoGenerateColumns="False"
                             IsReadOnly="True">
            <telerik:RadGridView.Columns>
 
                <telerik:GridViewDataColumn Header="Column1"
                                            Width="*"
                                            SortMemberPath="Column1"
                                            UniqueName="Column1" />
                <telerik:GridViewDataColumn Header="Column2"
                                            Width="Auto"
                                            SortMemberPath="Column2"
                                            UniqueName="Column2" />
                <telerik:GridViewDataColumn Header="Column3"
                                            Width="Auto"
                                            SortMemberPath="Column3"
                                            UniqueName="Column3" />
                <telerik:GridViewDataColumn Header="Column4"
                                            Width="Auto"
                                            SortMemberPath="Column4"
                                            UniqueName="Column4" />
                <telerik:GridViewDataColumn Header="Column5"
                                            Width="Auto"
                                            SortMemberPath="Column5"
                                            UniqueName="Column5"
                                            DataFormatString="{}{0:C}" />
                <telerik:GridViewDataColumn Header="Column7"
                                            Width="Auto"
                                            SortMemberPath="Column7"
                                            UniqueName="Column7"
                                            DataFormatString="{}{0:C}" />
                <telerik:GridViewDataColumn Header="Column7"
                                            Width="Auto"
                                            SortMemberPath="Column7"
                                            UniqueName="Column7" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>


I would expect the behavior for Width * instead to fill the available space if there is additional available horizontal space within the RadGridView control to fill. Generally this would be equal to the situation where a horizontal scroll bar is not automatically shown because it is not needed. If there is no additional horizontal space to consume with the * columns(s) then either their MinWidth values and/or Auto behavior come into play to determine what the size of these columns should be. After initial layout is done and the user attempts to re-size a column, then any column should allow resizing to grow the column larger up until it's MaxWidth value and push any columns to extend into the clipped region causing horizontal scroll to become active if it wasn't already.

If I change the definition of Column1 so that it has a Width of Auto instead of * so effectively there are no * columns then everything works as expected. Well almost, that is except for when the total width of all columns is less than the width of the GridView control itself then I get what a lot of people describe as the "extra blank column" which I understand is just there because there are no * columns to automatically fill the space. This is where I would expect a properly behaving * column to kick in and properly consume that available space, but only in this situation.
Vlad
Telerik team
 answered on 27 Sep 2012
1 answer
225 views
I'm using RadGridView with a GridViewDataColumn defined with custom CellTemplate and CellEditTemplate defined. What I would like to do now is affect something defined in my DataTemplate for the CellTemplate based on whether it's row is selected or not.

More specifically in my example I have a DataTemplate that contains a TextBlock with TextTrimming and TextWrapping set up to show the text as a single line with character ellipsis when there is overflow. What I would like to do is display the text with TextWrapping turned on and without TextTrimming which I could do various ways if I can access the selection state of the parent row for that cell.

<telerik:GridViewDataColumn.CellTemplate>
    <DataTemplate>
        <TextBlock Text="{Binding Note}"
               TextWrapping="NoWrap"
               TextTrimming="CharacterEllipsis" />
    </DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>

What's the best way for me to accomplish this with the RadGridView control? Is there an inherited attached property I can use or will a relative binding work. I would prefer doing this through a defined style with triggers on my TextBlock if possible to avoid writing value converters.
Jeff
Top achievements
Rank 1
 answered on 26 Sep 2012
1 answer
180 views
Can I construct a bar chart, stacked, that looks like the following?

http://www.highcharts.com/demo/bar-negative-stack
Petar Kirov
Telerik team
 answered on 26 Sep 2012
1 answer
131 views
Hey
I think, the tile tells all.
I don't want the enduser be able to enter a negative price. - How can I do this!?

Thx for any tipp!
Tina Stancheva
Telerik team
 answered on 26 Sep 2012
7 answers
228 views
Hello,

I've got a few questions regarding the RadRichTextBox.

1. How can I make the IBeam cursor display only within the editable area of the text box, but not on the scroll bars as well?

2. I see that the rich text box doesn't come with a default Copy/Cut/Paste contextual menu. How would I go about implementing a standard contextual menu with working cut/copy/paste functions, and how would I display it.

If you are kind to answer these questions, please tell me how to solve the problems using C# code, and not XAML.

Thank you!
Vasil
Telerik team
 answered on 26 Sep 2012
5 answers
214 views
Hello there,

I am trying to implement cusom tooltips which can get focus and are interactive (they have a scrollbar for example).
Therefore I registered to the ToolTipOpening event of some WPF Ellipse objects (the ToolTip property is just set to some sensless string to force WPF to fire the event). In the event handler I just open a Popup with a BooleanAnimationUsingKeyFrames animation attatched which closes the popup after some seconds if it doesn't get focus.
This works very well, but when I tried the same with MapPolyLine it didn't - i.e. the event is not firing.

So my question is, if there is any event which is fired when a tooltip is requested.

Best regards,
Markus
Andrey
Telerik team
 answered on 26 Sep 2012
1 answer
137 views
I want to draw a simple ellipse in radmap 
with width and height 
20000,
but incorrectly like 
an elongated oval is drawn Why do this?
Other shape like rectangle has same problem 
too.
I add a simple radmap:

       <telerik:RadMap x:Name="radMap">
            <telerik:RadMap.Provider>
                <telerik:EmptyProvider />
            </telerik:RadMap.Provider>
            <telerik:InformationLayer x:Name="informationLayer">
            </telerik:InformationLayer>
        </telerik:RadMap> In code behind:
            var newShape = new MapEllipse()
            {
                Location = new Location()
                {
                    Latitude = 50,
                    Longitude = -111,
                },
                Fill = new SolidColorBrush(Color.FromArgb (0xFF, 0xF0, 0xB5, 0x85)),
                Width = 20000,
                Height = 20000
            };
            this.informationLayer.Items.Add(newShape);
            radMap.Center = new Location( newShape.Location.Latitude, newShape.Location.Longitude);
Andrey
Telerik team
 answered on 26 Sep 2012
3 answers
221 views
Hi!
I have the following column in a grid. I want the editing mode for the corresponding cells to be activated when the user clicks on cell, which is occupied by my custom control.

How can I do that?

<telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
        <my:ReferencesEditor References="{Binding Path=Answer.References}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
        <my:ReferencesEditor References="{Binding Path=Answer.References}" EditMode="true" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>
Vlad
Telerik team
 answered on 26 Sep 2012
1 answer
99 views
Hello,

since Version 2012 Q1 the selected Row Syle is gray instead of orange when the GridView lose the focus.
How can I change this?

Thanks.
Yordanka
Telerik team
 answered on 26 Sep 2012
0 answers
104 views
Hi
I have a Radgrid that one column is a button. I make it in xaml. but when i bind a query to datagrid like: radGridTest.ItemsSource = query; data does not appear but when i bind it to a simple radgrid (which has no button column) every thing goes fine. the way i make the button column is here:
...
                   <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate >
                            <StackPanel Orientation="Horizontal">
                                <Button Width="25" Height="25" Background="Red"/>
                            </StackPanel>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
...
Raman
Top achievements
Rank 1
 asked on 26 Sep 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?