Telerik Forums
UI for WPF Forum
1 answer
196 views

GridViewSelectColumn seems to be very slow when selecting a very large list of items. From the looks of it, it appears to be issuing a property changed notification for each item individually.

Is there a way to speed it up?

Petya
Telerik team
 answered on 25 Jan 2016
7 answers
196 views

I read examples from docs.telerik.com, downloaded demos but they're often so long and i can not know what i need in them. 

I only need make an item of a list to parent items in code behind. Do i need HierarchicalDataTemplate or RadTreeViewItem ?

 

_______ my code _______

public static HttpClient client = new HttpClient() ;
private void _ProductList()
{
      var url = "api/Products/";
      HttpResponseMessage response = client.GetAsync(url).Result;

      if (response.IsSuccessStatusCode)
      {
         var x = response.Content.ReadAsAsync<List<Product>>().Result;
         Product allprod = new Product();
         allprod.ProdID = 0;
         allprod.Name = " All Products";

        x.Add(allprod);
        myTreeView.ItemsSource = x;
        myTreeView.DisplayMemberPath = "Name";
        myTreeView.SelectedValuePath = "ProdID";
        // ....
     }
     else
     {
        MessageBox.Show("Error Code " + response.StatusCode +
                    " : Message - " + response.ReasonPhrase);
     }
}

__________

I tried RadTreeViewItem, but it doesn't have SelectedValuePath property.

- Items show Name and selected value is its ProdID 
And it seems difficult to use HierarchicalDataTemplate in code behind (with me).

- With my code, i have "prod.png" and i need "need.png" 

It's the best if you can edit code to me, please. Thank you.

__________

At last, i think demos (not only treeview) need a version classic-demo which is the most simple (except styles) with small data.
Example "First look" is really a big demo.

Son
Top achievements
Rank 1
 answered on 25 Jan 2016
2 answers
88 views
I want to have a list image as blocks with border.
I tried using stackpanel or not but i can not set item in ListBoxItem to center.
---
My listbox.ItemsSource is list of bitmapimage converted from base64string in data from web api. So they don't have urls.
My xaml is in 1.png
Debug to actual-img.png. I want to have list such as wanted-img.png or wanted-img2.png.
Can you help me, please?
---
I need click to image, it will show an actual-size image (i can do this) but do you think i should try RadTileList? 
---
Thank you. 
Son
Top achievements
Rank 1
 answered on 25 Jan 2016
3 answers
318 views

Hello,

I just ported my solution from .NET 3.5 to .NET 4.6.1 and updated Telerik from version 2012.2.912.35 to 2015.3.1104.5.

This code used to work fine, the setter of the property was called when the control lost focus:

 <telerik:RadNumericUpDown Value="{Binding UIExceeding, Mode=TwoWay}" SmallChange="0" LargeChange="0">

 

After the framework and Telerik was updated, the setter was never called anymore. To go back to how it used to work, I had to add UpdateSourceTrigger=LostFocus and UpdateValueEvent="PropertyChanged":

  <telerik:RadNumericUpDown Value="{Binding UIExceeding, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" SmallChange="0" LargeChange="0" UpdateValueEvent="PropertyChanged">

 

Could you tell me what changed in between versions?

Thanks in advance

 

 

Nasko
Telerik team
 answered on 25 Jan 2016
9 answers
418 views
WPF 4.0 v2012.2.607.35
I have a grid of charges that are on invoices.  I want to show the charges by most recent invoice but sorting on the invoice number sorts incorrectly because it is a text field.  What I need to do is group by and show the InvoiceNumber but sort by the InvoiceId descending and not have the InvoiceId shown anywhere. 
Dilyan Traykov
Telerik team
 answered on 25 Jan 2016
6 answers
137 views

Hi,

I have problems when drag dropping inherited appointments from RadListBox to RadScheduleView. When the inherited class ProtocolChildAppointment (as below) is dropped from radListBox to scheduleview its a ProtocolAppointment class not the intented inherited class. I have tried to override Drop-function without success. Everything looks like its dropping a ProtocolChildAppointment  in the ConvertTo, ConvertDraggedData and Drop -functions.

public class ProtocolAppointment : Appointment
{
    public ProtocolAppointment()
        : base()
    {
    }
    // code...
    public override IAppointment Copy()
    {
        var newAppointment = new ProtocolAppointment();
        newAppointment.CopyFrom(this);
        return newAppointment;
    }
}

public class ProtocolChildAppointment : ProtocolAppointment
{
    public ProtocolChildAppointment()
        : base()
    {
    }
    //code...
    public override IAppointment Copy()
    {
        var newAppointment = new ProtocolChildAppointment();
        newAppointment.CopyFrom(this);
        return newAppointment;
    }
}

class ProtocolScheduleViewDragDropBehavior : Telerik.Windows.Controls.ScheduleViewDragDropBehavior
{
    public override IEnumerable<IOccurrence> ConvertDraggedData(object data)
    {
        if (DataObjectHelper.GetDataPresent(data, typeof(ProtocolAppointment), true))
        {
            return ((IEnumerable)DataObjectHelper.GetData(data, typeof(ProtocolAppointment), true)).OfType<IOccurrence>();
        }
        return base.ConvertDraggedData(data);
    }

    public override void Drop(Telerik.Windows.Controls.DragDropState state)
    {
        // here all stil looks like its dropping ProtocolChildAppointment
        base.Drop(state);
    }

}

class ProtocolAppointmentConverter : DataConverter
{
    public override string[] GetConvertToFormats()
    {
        return new string[] { typeof(PetErpUIClient.ProtocolAppointment).AssemblyQualifiedName };
    }

    public override object ConvertTo(object data, string format)
    {
        if (DataObjectHelper.GetDataPresent(data, typeof(ProtocolAppointment), false))
        {
            var payload = (IEnumerable)DataObjectHelper.GetData(data, typeof(ProtocolAppointment), false);
            if (payload != null)
            {
                List<PetErpUIClient.ProtocolAppointment> apps = new List<PetErpUIClient.ProtocolAppointment>();
                apps.AddRange(payload.OfType<PetErpUIClient.ProtocolAppointment>());
                return apps;
            }
        }
        return null;
    }
}

Kalin
Telerik team
 answered on 25 Jan 2016
3 answers
737 views

Hi,

I am using RadListBox with ContextMenu  for an item,

on every right click (only on an item) i need

1. that the menu will be open only on the item (when i am clicking on free space on the list area, i don't want that the menu will open)

2. get the selected item to my viewModel

 

this is my code:

<telerik:RadListBox

           ItemSource ="{Binding collection}" , SelectedItem="{Binding Selected2, mode =TwoWay}">

 <teletik:RadContextMenu.ContextMenu>

       <teletik:RadContextMenu>

          <telerik:RadMenuItem Header="This menu is only for item" command="{Binding c}" CommandParamter="{Binding=selectedItem}"/>

   </teletik:RadContextMenu.ContextMenu>
 </teletik:RadContextMenu>

 

 

 

 

shay
Top achievements
Rank 1
 answered on 24 Jan 2016
0 answers
198 views
I need Basic Memory Card Game source code WPF-C# please help me
Salih
Top achievements
Rank 1
 asked on 22 Jan 2016
1 answer
210 views
How can I add text to the timeline items
Dinko | Tech Support Engineer
Telerik team
 answered on 22 Jan 2016
2 answers
139 views
How can I filter with accent insensitive?
Alain
Top achievements
Rank 1
 answered on 22 Jan 2016
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?