Telerik Forums
UI for WPF Forum
3 answers
202 views
Is there a way to only update the value data binding when the user has done a thumb up action?

Thanks!
Martin Ivanov
Telerik team
 answered on 17 Jun 2014
3 answers
237 views
Hi. I have window with button and RadTabControl with 3 TabItem.
Button has click event 
private void BtnPrint_OnClick(object sender, RoutedEventArgs e)
        {
            Random r = new Random();
            var Background = Color.FromArgb((byte)r.Next(255), (byte)r.Next(255), (byte)r.Next(255), (byte)r.Next(255));
            Brush brush = new SolidColorBrush(Background);
            modulCalculationDefect.pipeControl.Background = brush;

            RenderTargetBitmap targetBitmap = new RenderTargetBitmap((int)modulCalculationDefect.pipeControl.ActualWidth,
                    (int)modulCalculationDefect.pipeControl.ActualHeight, 96d, 96d, PixelFormats.Default);
            targetBitmap.Render(modulCalculationDefect.pipeControl);

            BmpBitmapEncoder encoder = new BmpBitmapEncoder();
            encoder.Frames.Add(BitmapFrame.Create(targetBitmap));

            MemoryStream stream = new MemoryStream();
            encoder.Save(stream);
            BitmapImage bmp = new BitmapImage();
            bmp.BeginInit();
            bmp.StreamSource = new MemoryStream(stream.ToArray());
            bmp.EndInit();

            imageControl.Source = bmp;
        }
So when i click button I must change backgroud modulCalculationDefect.pipeControl, make image and view this image in imageControl. This work when select RadTabItem where located modulCalculationDefect.pipeControl. When selected another item image in imageControl doesn't change.
How can I fix that?

Martin Ivanov
Telerik team
 answered on 17 Jun 2014
2 answers
331 views
Hello Telerik,

I want to use the RadAutoCompleteBox but it should be possible to input a value which is not part of the itemssource.
The user should be able to either select a value from the itemssource or add a new item.

In other words the autocomplete should be optional. Is this possible?

Thanks for help.

Greetings
Michael
Michael
Top achievements
Rank 1
 answered on 17 Jun 2014
11 answers
524 views
Hello,

I found out that there's no such property inside the GridViewComboBoxColumn control to get the selected value. I tried a lot of things to get this value in my code but nothing worked, and I really need to use the selected value in my ComboBox since other cells will be supposed to be updated thanks to the selection.

Is there any way to do it please ?

I've two subsidiary questions : why this control doesn't contain this property like the RadComboBox, what's the point ? And, I also tried to write
((Telerik.Windows.Controls.GridViewBoundColumnBase)(editor)).OldValueReference.ToString()

And it appears that OldValueReference is unknown. I copied that from my var content, like in the pictures.

Thanks for your help !
Dimitrina
Telerik team
 answered on 17 Jun 2014
3 answers
217 views
Hi,

Will an export to MS Project be implemented in the future?
The CTP only mentions an import, not an export.

Best regards
Polya
Telerik team
 answered on 17 Jun 2014
1 answer
52 views
Can I make combobox PART_SimpleFilterMemberComboBox editable with text searching?
Dimitrina
Telerik team
 answered on 17 Jun 2014
1 answer
127 views
I'm using Radgridview in silverlight and I need to highlight the highest value within every columns.
The data is generic and I don't know what the type will be, the number of columns or the header's name.

Thanks,
Dimitrina
Telerik team
 answered on 17 Jun 2014
2 answers
173 views
       we are using a telerik autocomplete box.  Now, the code pasted below works on ALL computers except my surface pro 2.  any reason you know of?

Interestingly, this used to work on my machine because I approved the developers update.

The problem is that even though the "SelectedServices" is being populated, the control on the UI is not getting it.  and the control on the UI is not sending down the data either.

I can post any more info you guys need to help trace this.  But again, code works on all computers except surface pro 2 with windows 8.1

​ <telerik:RadAutoCompleteBox x:Name="ServicesAutoCompleteBox"
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Stretch"
AutoCompleteMode="Suggest"
DisplayMemberPath="ItemText"
FilteringBehavior="{StaticResource CustomFilteringBehavior}"
GotFocus="UIElement_OnGotFocus"
ItemsSource="{Binding ServiceItems}"
SelectedItems="{Binding SelectedServices,
UpdateSourceTrigger=PropertyChanged}"
SelectionMode="Multiple"
TextSearchMode="StartsWith"
TextSearchPath="ItemText"
WatermarkContent="Type or click to add Services...."
>
<telerik:RadAutoCompleteBox.BoxesItemTemplate>
<DataTemplate DataType="lookups:ItemLookupViewModel">
<WrapPanel Width="{Binding ElementName=ServicesAutoCompleteBox,
Path=ActualWidth}"
Margin="0 0 -30 0"
>
<TextBlock Padding="0 0 30 0"
Text="{Binding ItemText}"
TextWrapping="Wrap"
/>
</WrapPanel>
</DataTemplate>
</telerik:RadAutoCompleteBox.BoxesItemTemplate>
</telerik:RadAutoCompleteBox>


#region Methods

private void PopulatAutoBoxCollection(object sender)
{
var autoComplete = (RadAutoCompleteBox) sender;
autoComplete.Populate(autoComplete.SearchText);
}

#endregion

#region Event Handlers

private void UIElement_OnGotFocus(object sender, RoutedEventArgs e)
{
PopulatAutoBoxCollection(sender);
}

#endregion


public class CustomFilteringBehavior : FilteringBehavior
{
#region Methods

public override IEnumerable<object> FindMatchingItems(string searchText, System.Collections.IList items, IEnumerable<object> escapedItems, string textSearchPath, TextSearchMode textSearchMode)
{
if (string.IsNullOrEmpty(searchText))
{
return items.OfType<object>().Where(x => !escapedItems.Contains(x));
}
return base.FindMatchingItems(searchText, items, escapedItems, textSearchPath, textSearchMode);
}

#endregion
}






public ObservableCollection<ItemLookupViewModel> ServiceItems { get; private set; }

public ObservableCollection<ItemLookupViewModel> SelectedServices { get; set; }


SelectedServices = new ObservableCollection<ItemLookupViewModel>();
SelectedServices.CollectionChanged += SelectedServicesCollectionChanged;

// Set Services.-- this copies data from the model into the bound control

            foreach (var serviceItem in _solicitation.Services)
foreach (var serviceItemVm in ServiceItems)
if (serviceItem.Service.RefItemId == serviceItemVm.ItemId)
SelectedServices.Add(serviceItemVm);

private void SelectedServicesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
IndicateSolicitationChanged();

if (e.NewItems != null && e.NewItems.Count != 0)
{
// foreach (ItemLookupViewModel siVm in e.NewItems)
// {
// }
}

if (e.OldItems != null && e.OldItems.Count != 0)
{
foreach (ItemLookupViewModel siVm in e.OldItems)
siVm.Cleanup();
}
}







Robert
Top achievements
Rank 1
 answered on 16 Jun 2014
3 answers
134 views
Hi!

I can't move/drag any shape created to RadDiagram inside Visual Studio's designer. Shape is always created to the top left corner of the diagram.
Also even though I think I have all the necessary assemblies referenced I get an exception after trying to add RadDiagram (Wizard shows up and I use default selections and press "Ok" button).

Version of the assemblies are: 2013.3.1313.45

Assemblies I'm referencing are:
- Telerik.Windows.Controls.Diagrams
- Telerik.Windows.Controls.Diagrams.Extensions
- Telerik.Windows.Controls.Input
- Telerik.Windows.Controls.Navigation
- Telerik.Windows.Diagrams.Core
- Telerik.Windows.Controls.DataVisualization
- Telerik.Windows.Controls.GridView (I also have some gridview's in use)
- Telerik.Windows.Data
- Telerik.Windows.Documents
- Telerik.Windows.Documents.Core
- Telerik.Windows.Documents.Flow

Exception after wizard closes:
ArgumentException: Property not found: FrameworkElement.Name
Parameter name: FrameworkElement.Name

StackTrace:
at Telerik.Windows.Core.Design.ModelItemExtensions.GetValue(ModelItem item, PropertyIdentifier identifier)
   at Telerik.Windows.Core.Design.ModelItemExtensions.<>c__DisplayClass8.<FindDescendantItemByName>b__5(ModelItem x)
   at Telerik.Windows.Core.Design.ModelItemExtensions.FindDescendantItem(ModelItem item, Predicate`1 condition)
   at Telerik.Windows.Core.Design.ModelItemExtensions.FindDescendantItem(ModelItem item, Predicate`1 condition)
   at Telerik.Windows.Core.Design.ModelItemExtensions.FindDescendantItem(ModelItem item, Predicate`1 condition)
   at Telerik.Windows.Core.Design.ModelItemExtensions.FindDescendantItem(ModelItem item, Predicate`1 condition)
   at Telerik.Windows.Core.Design.ModelItemExtensions.FindDescendantItem(ModelItem item, Predicate`1 condition)
   at Telerik.Windows.Core.Design.ModelItemExtensions.FindDescendantItemByName(ModelItem item, String name, Boolean contains)
   at Telerik.Windows.Controls.Diagrams.Design.DiagramWizard.DiagramWizardManager.GetUniqueName(ModelItem rootModel, String baseName)
   at Telerik.Windows.Controls.Diagrams.Design.DiagramWizard.DiagramWizardManager.PrepareRootPanel()
   at Telerik.Windows.Controls.Diagrams.Design.DiagramWizard.DiagramWizardManager.DiscoverRootPanels()
   at Telerik.Windows.Controls.Diagrams.Design.DiagramWizard.DiagramWizardManager.FinalizeWizard()
   at Telerik.Windows.Documents.VisualStudio.Design.Wizard.WizardWindow.Complete()
   at Telerik.Windows.Documents.VisualStudio.Design.Wizard.WizardWindow.Finalize()
   at Telerik.Windows.Controls.Diagrams.Design.RadDiagram.DiagramAdorner.<>c__DisplayClass4.<currentWindow_Closed>b__3()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

I have had this problem for some time now, I'm currently using 2013 Q3 NET 4.5 components for WPF and it was the same with previous versions also.

What could be causing this problem?

Br,

Kalle





Zarko
Telerik team
 answered on 16 Jun 2014
2 answers
277 views
Hello.  I am trying to solve the problem of keeping our data fresh using the Telerik WPF RadGridView.  I know that Telerik loads an in-memory copy of the collection that it binds to, but is there a way to keep it fresh?  We have a grid that queries 45,000 records.  Currently we have it working with a plain old windows grid by laoding in a page size at a time of records.  Because it goes back to the database each time we click the page buttons or do a sort or filter, the data stays fresh.  On the other hand, I also have a Telerik grid that queries the same set of records, but since it does not go back to the database for page operations and sorting and filtering, it gets stale data.  I verified this by updating some of the database fields and observing the old values instead of new ones.  Our work environment demands that the data be as fresh as possible (not just for insertion and deletion of records but for updating of existing records).  We have kicked around several ideas such as a refresh button, having a timer that goes back to the database to load every 15 minutes, or doing a database pull each time that the user does a paging, sort, or filter operation.  However, I am having a hard time finding the event in the RadGridPager that will let me make this call in the view model.  Is it even exposed?  Keep in mind that we are using MVVM, so I can use code behind if needed, but I would like to avoid that if possible.  Thank you.
Mike
Top achievements
Rank 1
 answered on 16 Jun 2014
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
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?