Telerik Forums
UI for WPF Forum
1 answer
344 views
Hi,

I am facing a problem with the GridViewComboBoxColumn.  I have a view set up with a RadGridView using three columns, one of which is a ComboBoxColumn.  The ComboBoxColumn is bound to an ObservableCollection which consists of 9 "Service" items.  The combobox is updating correctly and containing the proper items, and all of the databindings I'm using (using the MVVM model) are working correctly.

The situation is as such.  When I click on the "Click here to add new item" row, and it generates the item to add, the combobox initially has a blank value selected (and it shows blank).  If I click on the combobox, I see all 9 items as options, and there is no blank option to select.  However, if I just click on another cell, the combobox selection stays blank.  If I select one of the specific items in the combobox, then it will update to the item I selected and I will not be able to change it back to a blank value.

The problem I face is this.  I don't want the user to be able to leave that combobox item blank.  I'd prefer, when I initially click the "Click here to add new item" indicator, for the combobox to automatically default to the first item in its list and to display accordingly.  Alternatively, I'd like to configure it to not allow you to add the new row unless a specific item is selected in the combobox.  I haven't been able to find the appropriate properties or methods to call to accomplish there.  Does anyone know how I can set this up?

Thank you,
Jason
Maya
Telerik team
 answered on 07 Sep 2010
11 answers
405 views
I am using RadControls for WPF build 2010.1.416.35. I have a radchart and define the SeriesMappings in XAML and when it tries to render the XAML below in VS2008 or Blend 3 I get the error "Invalid property or field - 'TimeStamp' for type: Double" in design view.
<telerik:RadChart x:Name="hydroChart" Margin="8,34,0,0" ItemsSource="{Binding DataPoints, Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Top" 
                          telerik:Theming.Theme="Summer">  
            <telerik:PointMark Size="1">  
                  
            </telerik:PointMark> 
            <telerik:RadChart.SamplingSettings> 
                <telerik:SamplingSettings SamplingFunction="KeepExtremes" SamplingThreshold="50"/>  
            </telerik:RadChart.SamplingSettings> 
            <telerik:RadChart.AnimationSettings> 
                <telerikChart:AnimationSettings ItemAnimationDuration="00:00:00" ItemDelay="00:00:00" DefaultSeriesDelay="00:00:00"/>  
            </telerik:RadChart.AnimationSettings> 
            <telerik:RadChart.DefaultView> 
                <telerik:ChartDefaultView>                    
                    <telerik:ChartDefaultView.ChartArea> 
                        <telerik:ChartArea NoDataString="No Data....." LegendName="chartLegend">  
                            <telerikChart:ChartArea.AdditionalYAxes> 
                                <telerikChart:AxisY AutoRange="False" AxisName="TEMPER" DefaultLabelFormat="#VAL F" MaxValue="110" MinValue="50" Step="20" Title="Temperature in F"/>  
                            </telerikChart:ChartArea.AdditionalYAxes> 
                            <telerikChart:ChartArea.AxisY> 
                                <telerikChart:AxisY AutoRange="False" MinValue="0" MaxValue="25000" Step="1000" Title="PSI" AxisName="PSI"/>  
                            </telerikChart:ChartArea.AxisY> 
                            <telerik:ChartArea.AxisX> 
                                <telerik:AxisX LabelRotationAngle="90" LabelStep="2" Title="Time" IsDateTime="True" DefaultLabelFormat="#VAL{hh:mm:ss}"/>  
                            </telerik:ChartArea.AxisX>                              
                        </telerik:ChartArea>                                
                    </telerik:ChartDefaultView.ChartArea>                      
                    <telerik:ChartDefaultView.ChartLegend> 
                        <telerik:ChartLegend x:Name="chartLegend" Header="In-Process Hydro" UseAutoGeneratedItems="True" ></telerik:ChartLegend> 
                    </telerik:ChartDefaultView.ChartLegend> 
                </telerik:ChartDefaultView> 
            </telerik:RadChart.DefaultView> 
            <telerik:RadChart.SeriesMappings> 
                <telerik:SeriesMappingCollection> 
                    <telerik:SeriesMapping LegendLabel="Inlet PSI">   
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}">  
                                  
                            </telerik:LineSeriesDefinition> 
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="InletPressure"  /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Outlet PSI">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="OutletPressure" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping>      
                    <telerik:SeriesMapping LegendLabel="Ambient Temp">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewAmbientTemp" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp In">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempIn" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp Out">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempOut" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                </telerik:SeriesMappingCollection> 
            </telerik:RadChart.SeriesMappings> 
            <telerik:RadChart.DefaultSeriesDefinition> 
                <telerik:LineSeriesDefinition LegendDisplayMode="SeriesLabel" ShowItemLabels="False" ShowItemToolTips="True"/>  
            </telerik:RadChart.DefaultSeriesDefinition> 
        </telerik:RadChart> 

But when I only have 1 SeriesMapping everything works as expected. Is this a known bug, or am I missing something?

 Everything compiles fine, and when I run the program it renders properly. Any help is appreciated.

Thanks,
Ryan
Velin
Telerik team
 answered on 07 Sep 2010
3 answers
204 views

Hi,

I’m calling an asynchronous WCF service and adding the items into the RadComboBox.  I would like to call the same service as I am typing in the RadComboBox (text passed as a parameter to the service) and auto fill and display the results. Please advise.

Thanks
RJ

Konstantina
Telerik team
 answered on 07 Sep 2010
3 answers
257 views

Hello

In this point the  property  ValidatesOnDataErrors  available in SL only

When this will be available for WPF?

Best regards

Ehud

Nedyalko Nikolov
Telerik team
 answered on 07 Sep 2010
1 answer
274 views
Hello,

I have a little problem with editing value when ValueFormat is set to Percent. When control has no focus, the value I see is "250 %". When I focus the control to edit value, the value of control change to "2.5". Can the edited value be "250 %" instead of "2.5" ?

The control is set something like that: 

<telerik:RadNumericUpDown Value="{Binding Rate, Mode=TwoWay}" ValueFormat="Percentage" LargeChange="0.2" SmallChange="0.1">
<telerik:RadNumericUpDown.NumberFormatInfo>
<sysGlob:NumberFormatInfo PercentDecimalDigits="0"/>
</telerik:RadNumericUpDown.NumberFormatInfo>
</telerik:RadNumericUpDown>

 

 

 

 


Thanks in advance.

David
Boyan
Telerik team
 answered on 07 Sep 2010
1 answer
155 views
Hi,

This is probably some flag I am missing. But the behavior I see is:
When I select a child node in my tree view, the contents on the treeview shift to the left so that the left edge of the selected child item is a few pixels from the treeview edge. This causes the treeview to be partially obscured (till the selector arrow thing of the parent item has been shifted out of view.)

Oh and it stops doing that if I set my root node to have a set width that is less than the width of my treeview. But I dont want to do it since I do not know how big the nodes will be.

Any idea what I am doing wrong?

thanks,
JK
Hristo
Telerik team
 answered on 07 Sep 2010
4 answers
203 views
Hello I have a problem with RadCarousel, at runtime you can not add items to the carousel OpenDialog because when I connect my ItemSource with images not see it, I realized that if the images are not shown in project resources can not be seen ...
What I have to do to see the images that are not in the resources folder?

DataTemplate?

C # code?

thank you very much, sorry for my english

 

   
  
public partial class Window1 : Window 
    {
        List<Image> lista; 
        private const String Extension = "(*.jpg)|*.jpg|(*.png)|*.png"
  
        public Window1() 
        {
            InitializeComponent();
            lista = new List<Image>();
            Microsoft.Win32.OpenFileDialog dialog ;
         }
  
        private void button1_Click(object sender, RoutedEventArgs e) 
            {
  
                lista.Clear();
                dialog = new Microsoft.Win32.OpenFileDialog { RestoreDirectory = true, Filter = Extension, Multiselect = true }; 
            
       if (dialog.ShowDialog() == true
                    {
                         foreach (string Name in dialog.FileNames) 
                 {
                        Image Im = new Image()
                Im.Source = new BitmapImage(new Uri(fName, UriKind.Relative)); 
                         lista.Add(Im);
  
                }
  
            this.radCarousel1.ItemsSource = lista; 
   
            }
  
        }
  
    }
  
}

Vic
Top achievements
Rank 1
 answered on 06 Sep 2010
2 answers
160 views
I am using the MVVM design pattern and am attempting to add a button to perform an action on all items in a group. I have successfully added the button to the group header template and am attempting to find the view models of the group's rows with the following code:

private void validateGroupButton_Click(object sender, RoutedEventArgs e)
        {
            var sourceUIElement = (UIElement)sender;
            var group = sourceUIElement.ParentOfType<GridViewGroupRow>();
            var collectionViewGroup = (CollectionViewGroup)group.DataContext;
            var grid = sourceUIElement.ParentOfType<RadGridView>();
            var vm = (ManualDealsViewModel)grid.DataContext;
            var toValidate = collectionViewGroup.Items.Cast<ManualDealViewModel>().ToList();
              (.... perform action on toValidate enumeration ...)
            }

This basically works, however the toValidate enumeration only contains the rows that are currently visible in the group. 

Is there a way to retrieve all the view models that match the group, even if they are not presently visible?
David
Top achievements
Rank 1
 answered on 06 Sep 2010
1 answer
179 views
Hi guys.

What would be the best way in xaml to display a RadGridViewColumn only when data is available
e.g.
I have to column in my Radgridview. These columns are binding against an IEnumerable List of Materials (Type: MATERIAL)

If one column doesn not contain any data in all underlying rows, i would like not to display this column. (i only want to display columns with cell values)
How can this be done?
thanks for your help
<DataTemplate>
    <tcg:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="False" AutoGenerateColumns="False" ItemsSource="{Binding MBEP}"  ShowGroupPanel="False" IsReadOnly="True">
        <tcg:RadGridView.Columns            
                <tcg:GridViewDataColumn DataMemberBinding="{Binding MATERIAL.Txt1}" Header="Material Descr."/>
                <tcg:GridViewDataColumn DataMemberBinding="{Binding MATERIAL.MatNr}" Header="Material No" Width="{Binding MATA.MatNr.Length}"/>
        </tcg:RadGridView.Columns>
    </tcg:RadGridView>
</DataTemplate>
Milan
Telerik team
 answered on 06 Sep 2010
2 answers
214 views

I have a RadGridView that is populated dynamically by a data table. Certain columns are calculated from other columns but the calculations are done by my own calculation engine. When one of the underlying columns is changed I pick up the event and check whether it is part of a calculation. If it is then I do the calculation and need to update the relevant cell/s.

 

My problem comes in when wanting to update the cell/s. Right now I am changing the data table data and then binding the data table back to the grid and calling refresh function.

 

DataTable source = ( DataTable ) this.gridLogsheetGrid.ItemsSource;

 

//Change cell data

 

this.gridLogsheetGrid.ItemsSource = source;

this.gridLogsheetGrid.Items.Refresh ( );

 

This works, however it refreshes the entire grid and is therefore expensive and the grid disappears for a second or two.

 

I have read the thread on applying using the INotifyPropertyChanged event but how will I use this on an individual column on a data table?

Chris
Top achievements
Rank 1
 answered on 06 Sep 2010
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?