Telerik Forums
UI for WPF Forum
2 answers
186 views
Hi,
When i bind 3000 records in RadGrid (only one column) GridViewComboBoxColumn
i got terrible performance.

I need to do this from code behind.

to reproduce problem make WPF in Browser application, and add this page
<Page x:Class="Bug_Demo_ComboBoxColumn_Scroll.Page1"       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"        xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"       mc:Ignorable="d"        d:DesignHeight="300" d:DesignWidth="300"       Title="Page1">     <Grid>         <telerik:RadGridView              Name="dgDynGrid"                        AutoGenerateColumns="False"                            EnableColumnVirtualization="True"             EnableRowVirtualization="True"                         ShowGroupPanel="False"             IsFilteringAllowed="False"             DataLoadMode="Asynchronous"               CanUserInsertRows="True"                          CanUserResizeColumns="False"             CanUserFreezeColumns="False"             RowIndicatorVisibility="Collapsed"               />          </Grid> </Page>

Then make two classes:
    public class Persons     {         public int Id { getset; }         public string Name { getset; }         public string PlaceId { getset; }     }
    public class Place     {         public int PlaceId { getset; }         public string PlaceName { getset; }     }

in constructor of "Page1" fill test data:
List<Place> places = new List<Place>();             for (int i = 0; i < 3000; i++)             {                 Place p = new Place();                 p.PlaceId = i;                 p.PlaceName = "PlaceWithID" + i.ToString();                 places.Add(p);             }             List<Persons> persons = new List<Persons>();             for (int i = 0; i < 3000; i++)             {                 Persons p = new Persons();                 p.Id = i;                 p.PlaceId = i.ToString();                 persons.Add(p);             }

Add column:
Telerik.Windows.Controls.GridViewComboBoxColumn column = new Telerik.Windows.Controls.GridViewComboBoxColumn();             column.DataMemberBinding = new Binding("PlaceId");             column.DisplayMemberPath = "PlaceName";             column.SelectedValueMemberPath = "PlaceId";             column.ItemsSource = places;             dgDynGrid.Columns.Add(column);             dgDynGrid.ItemsSource = persons;

is it possible to turn on virtualization in GridViewComboBoxColumn ?


Pavel Pavlov
Telerik team
 answered on 03 Sep 2011
1 answer
38 views
It is possible mark in timeline bar the seleted appointment(s) and the appointment dragged? The link contains a screenshot where I've drawn the red lines with the Paint program:
Valeri Hristov
Telerik team
 answered on 02 Sep 2011
2 answers
65 views
GridView windows control can insert update delete automatic and insert connection to SQL.How can i do like that in RadGridView?if can,can you make a video to easy understand?I want to insert update delete like the demo Command of RadGridView 100% with SQL server using C#.how con i do?

thank you  thank you very very much!Please!
Pavel Pavlov
Telerik team
 answered on 02 Sep 2011
9 answers
531 views
I am using the RADGrid view in a WPF application and need to add validation for a couple of properties that are bound to the grid. I have implemented IDataErroinfo on may data object class that is the source of my binding. The validation is working almost like I need it to.

when the application loads and my property values are not valid the validation works as expected. My cells with invalid data is surrounded with a red line and I get the icon displayed in front of the row with errors. When I edit the cell and correct the data the red outline of the cell goes away it I tab out the cell or hit enter. However the error icon stays unless I hit the enter key or tab through all the cells in the row.

The behavior I am trying to achieve is that when the user leaves(by using the enter key,tab out of the cell or when the cell loses focus)  the cells and no other cells contain data the error icon disappears as well.

I am also using the cell validating event on the RadGrid view to validate the cell data and that seems to work except the error indicator stays there.

Thanks,
Alan Frye

Rayne
Top achievements
Rank 1
 answered on 02 Sep 2011
3 answers
285 views
Hello, how can I keep my button from its pressed state? For example, I clicked on the ViewByday Button, then its pressed state or activated state is still there unless i'll click another radbutton. Please help. Thanks
Kiril Stanoev
Telerik team
 answered on 02 Sep 2011
2 answers
135 views
Hi,
I am having an issue in binding a Value Converter in a GridViewDataColumn in RadTreeListView columns. If i add the same to DataTemplate then it works fine. Is there any way to directly use with the GridViewDataColumn .

Please find the code below.

This does not work.

<

 

telerik:RadTreeListView x:Name="rtlvPeopleInfo" >

 

 

 

 

    <telerik:RadTreeListView.Columns>

 

 

 

        <telerik:GridViewDataColumn x:Name="gvcPlanFinish" DataMemberBinding="{Binding PlanEndDate}" Header="Plan Finish"

 

 

                Background="{Binding PlanEndDate, Converter={StaticResource PlanFinishBackColorConverterKey}}" 
                DataFormatString="{}{0:MM-dd-yyyy}" />

 

 

 

 

    </telerik:RadTreeListView.Columns>

 

 

 

</telerik:RadTreeListView>

But if i am doing the same in code behind with data template that works fine

 

private

 

void SetValueConvertersInColumns()

 

{

 

GridViewDataColumn gvcPlanFinish = new GridViewDataColumn();

 

 

FrameworkElementFactory tbPlanWork = new FrameworkElementFactory(typeof(TextBlock));

 

 

Binding bndText = new Binding("PlanEndDate");

 

bndText.Mode =

BindingMode.TwoWay;

 

tbPlanWork.SetBinding(

TextBlock.TextProperty, bndText);

 

 

Binding bndPlanWorkBackGround = new Binding("PlanEndDate");

 

bndPlanWorkBackGround.Converter =

this.FindResource("PlanFinishBackColorConverterKey") as IValueConverter;

 

tbPlanWork.SetBinding(

TextBlock.BackgroundProperty, bndPlanWorkBackGround);

 

 

 

DataTemplate dataTemplate = new DataTemplate();

 

dataTemplate.VisualTree = tbPlanWork;

gvcPlanFinish.CellTemplate = dataTemplate;

gvcPlanFinish.CellTemplate.Seal();

gvcPlanFinish.DataMemberBinding =

new Binding("PlanEndDate");

 

rtlvTreeListView.Columns.Add(gvcPlanFinish); //Adding the new column

}

Manishkumar
Top achievements
Rank 1
 answered on 02 Sep 2011
1 answer
122 views
Hello I am working with the RadDatePicker and it works fine but I can't seem to figure out how tp display text in the textbox part, other than a watermark. We use it for insurance expiration dates and one of the possible fields would be "No End" instead of a date. How can I do this? Thank you again for your help. 


Sean
Yana
Telerik team
 answered on 02 Sep 2011
3 answers
258 views
Hello i try the latest internal build from Q2 2011 for WPF 4. I have some radwindows as usercontrol
defined in the main xaml file. I get compiler errors and can't get it to run.
In code i call CtlNewPerson.ShowDialog()
This sample is runnning under Q1 SP1 latest internal build correctly.
Can you please check this issue.
best regards ...
<telerik:RadWindow x:Name="WindowNewPerson" Width="800" Height="626" Header="Test ..." WindowStartupLocation="CenterScreen" telerik:StyleManager.Theme="Windows7" FontFamily="Verdana" IsRestricted="True" ResizeMode="NoResize" >
      <telerik:RadWindow.Background>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="White"/>
              <GradientStop Color="#FFE5EAEC" Offset="1"/>
          </LinearGradientBrush>
      </telerik:RadWindow.Background>
      <telerik:RadWindow.Effect>
          <DropShadowEffect BlurRadius="50" ShadowDepth="10" Opacity="0.5" Direction="290" RenderingBias="Performance"/>
      </telerik:RadWindow.Effect>
      <local:ScrNewPerson x:Name="CtlNewPerson"/>
  </telerik:RadWindow>
Yana
Telerik team
 answered on 02 Sep 2011
3 answers
141 views
Hi

I'm currently evaluating the RichtextControl of Telerik.

When I try to import HTML with a image tag, which has an image that does not exist, I got a pixelFormat error.

How can I handle missing images in HTML  ?

Here is the load code

  public void Load(string htmlInput)
        {
 
            HtmlFormatProvider provider = new HtmlFormatProvider();
        
            RadDocument telDoc = provider.Import(input);
            telerikTextBox.Document = telDoc;
 
            //spellchecker language anpassen
            telerikTextBox.IsSpellCheckingEnabled = false;
 
            this.telerikTextBox.SpellChecker.SpellCheckingCulture = new CultureInfo("en-US");        
                 }

I tried it with the  using the
LoadImageFromUrl
event from HtmlImportSettings


But this didn't helped

 Bitmap image = new Bitmap(16, 16);
 
        void settings_LoadImageFromUrl(object sender, LoadImageEventArgs e)
        {
            if (e != null)
            {
 
                MemoryStream memStream = new MemoryStream();
 
                image.Save(memStream, ImageFormat.Bmp);
 
               
 
                 e.ImageElement.Init(memStream, ".bmp");
            }
        }
Iva Toteva
Telerik team
 answered on 02 Sep 2011
1 answer
106 views

I have a problem changing a property of the RadTileView control (e.g. IsEnabled) using the properties panel. I get always an error message. I did the following steps:

  1. Create a new WpfApplication
  2. I dropped a RadExpander control
  3. I dropped a RadTileView control
  4. Select the RadExpander, click the IsEnabled property in the property panel
    à there is no problem
  5. Select the RadTileView, click the IsEnabled property in the property panel
    à I get the message “Property value is not valid”


Error message in MainWindow:

Ambiguous match found.
   at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
   at System.Type.GetProperty(String name)
   at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsDirect()
   at System.ComponentModel.DependencyPropertyDescriptor.FromProperty(DependencyProperty dependencyProperty, Type targetType)
   at Microsoft.Expression.Platform.WPF.WpfDependencyPropertyImplementation.get_Attributes()
   at Microsoft.Expression.DesignModel.Metadata.DependencyPropertyReferenceStep.get_Attributes()
   at Microsoft.Expression.DesignModel.Metadata.ClrObjectMetadata.InitializeAlternateContentPropertiesIfNecessary()
   at Microsoft.Expression.DesignModel.Metadata.ClrObjectMetadata.GetContentProperties()
   at Microsoft.Expression.DesignModel.Metadata.ClrObjectMetadata.get_ContentProperties()
   at Microsoft.Expression.DesignModel.Core.ViewNodeManager.InvalidateInternal(List`1 invalidRoots, Boolean forceValidateExpressionCache)
   at Microsoft.Windows.Design.Platform.ViewProducerBase.ApplyUpdate(Delta delta)
   at Microsoft.Windows.Design.Platform.ViewProducerBase.IncrementalRebuild(DocumentTreeManager tree, Damage damage)
   at Microsoft.Windows.Design.Platform.ViewProducerBase.UpdateView(DocumentTreeManager tree, Damage damage)
   at Microsoft.Windows.Design.DocumentModel.ViewProducer.UpdateView(UpdateDamageArguments args)
Zarko
Telerik team
 answered on 02 Sep 2011
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?