Telerik Forums
UI for WPF Forum
3 answers
122 views
hi
i need to export to excell for the datagrid
i use the same way from your example
i have problem with exporting hebrew language.

 

if (dialog.ShowDialog() == true)

 

{

 

using (Stream stream = dialog.OpenFile())

 

{

radGridView_searchResult.Export(stream,

 

new GridViewExportOptions()

 

{

Format = format,

ShowColumnHeaders =

true,

 

 

ShowColumnFooters = true,

 

ShowGroupFooters =

true,

 

Encoding =

Encoding.GetEncoding("windows-1255"),

 

});

 

}

}

Yavor Georgiev
Telerik team
 answered on 17 May 2010
3 answers
212 views
Hi,

In my application I get regulary this message:

System.InvalidOperationException was unhandled by user code
  Message=Specified element is already the logical child of another element. Disconnect it first.
  Source=PresentationFramework
  StackTrace:
       at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
       at System.Windows.FrameworkElement.AddLogicalChild(Object child)
       at System.Windows.Controls.ContentControl.OnContentChanged(Object oldContent, Object newContent)
       at System.Windows.Window.OnContentChanged(Object oldContent, Object newContent)
       at Telerik.Windows.Controls.Docking.FakePopupWindow.OnContentChanged(Object oldContent, Object newContent) in c:\Builds\WPF_Scrum\Docking_WPF_2010_Q1\Sources\Development\Controls\Docking\Docking\Popup\FakePopupWindow.cs:line 46
       at System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Controls.ContentControl.set_Content(Object value)
       at Telerik.Windows.Controls.Docking.FakePopupWindow..ctor(Window owner, FakePopup p) in c:\Builds\WPF_Scrum\Docking_WPF_2010_Q1\Sources\Development\Controls\Docking\Docking\Popup\FakePopupWindow.cs:line 34
       at Telerik.Windows.Controls.Docking.FakePopup.Open() in c:\Builds\WPF_Scrum\Docking_WPF_2010_Q1\Sources\Development\Controls\Docking\Docking\Popup\FakePopup.cs:line 52
       at Telerik.Windows.Controls.Docking.FakePopup.OnLoaded(Object sender, RoutedEventArgs e) in c:\Builds\WPF_Scrum\Docking_WPF_2010_Q1\Sources\Development\Controls\Docking\Docking\Popup\FakePopup.cs:line 143
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
       at MS.Internal.LoadedOrUnloadedOperation.DoWork()
       at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       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)
  InnerException:

Any idea what can cause this problem?

Thanks in advance,
Thomas
Miroslav Nedyalkov
Telerik team
 answered on 17 May 2010
1 answer
87 views
Hi,

Is it possible to include a 'Contains' filtering condition for columns with DateTime data type (See attachment). We need this to allow our users to filter records based on a particular month. The date time format we're using is dd/MM/yyyy.

Thanks in advanced.
Rossen Hristov
Telerik team
 answered on 17 May 2010
3 answers
135 views
I have a grid view sorted by a date column, users can add records to the grid view via the "Click here to add new item" row, a context menu, or ribbon button.  All the non-grid view method just call the BeginInsert method of the grid view which seems to work without issue.  I would like to automatically set the inserted row as the selected row of the grid view when the insert is complete.  To do this I am using edit complete handler bellow:

     private void crashRowEditComplete(object sender, GridViewRowEditEndedEventArgs e) 
        { 
            if (e.EditAction == GridViewEditAction.Commit 
                && e.EditOperationType == GridViewEditOperationType.Insert) 
            {                 
                ApplicationState.Carrier.Crashes.Add((Crash)e.NewData); 
                ApplicationState.Carrier.Drivers.Add(((Crash)e.NewData).Driver); 
                ApplicationState.Carrier.Vehicles.Add(((Crash)e.NewData).Vehicle); 
                crashListGrid.SelectedItem = e.NewData; 
            } 
        } 

The handler is running fine (checked through debug and the fact that the data does get written out to the file - dependent on the three Add statements), but the item is not getting selected correctly.  Instead the first row in the grid always gets selected.  This seemed like a pretty simple requirement and I have manipulated the grid selection previously without issue.
Veselin Vasilev
Telerik team
 answered on 17 May 2010
1 answer
107 views
Hello,

My company is evaluating the RadGridView for use in a project with a final delivery date in October, with an upcoming checkpoint next month. I have been unable to find any documentation of support for the 4.0 CLR. We are committed to EF4, so that is a requirement.

I have used the control in our 4.0 project with reasonable success, but I am seeing some discrepancies between the way the control works in Blend and in the project.

Do you support this control in 4.0 projects? When will it be supported in that environment? Is there a list of known issues workarounds in that environment?

Thanks!
Hristo
Telerik team
 answered on 17 May 2010
4 answers
115 views
Hi,

WPF Q1 2010 - Win XP SP3

When I 
1. Dynamically create a pane containing a grid and move it to document host (NO other panes open).
2. Drag it so it is floating.
3. Dock it.
4. Unpin so auto hide kicks in.
5. Mouse over so the window slides out.

- Problem - when mouse leaves the area of the slided-out pane, it does not hide again.  

6. If I open another pane and move it to the document host, now the original page behaves correctly (hiding and so on).
7. Close the second pane (the one docked in the document host) and the original pane contiues to behave correctly now (hiding nd so on).

Also, are the docking controls getting slow and clunky now or is it me ?

Any Ideas,

Thanks
Rob
Robin Das
Top achievements
Rank 1
 answered on 16 May 2010
2 answers
332 views
Why doesn't this work?

 

/// <summary>  
/// Satisfies req for IPartnerMessenger. Dynamically Loads Partner radtab content.  
/// </summary>  
/// <param name="PartnerType"></param>  
/// <param name="partner"></param>  
public void NotifyPartnerSelection(Type PartnerType, Partner partner)  
{  
    if (PartnerType == typeof(EmailPartner))  
    {  
        this._selectedPartner = (EmailPartner)partner;  
        this.PartnerRadTabItem.SetValue(RadTabItem.ContentProperty, new EmailPartnerView(this, (EmailPartner)partner));  
    }  
    else if (PartnerType == typeof(NamedCallPartner))  
    {  
        this._selectedPartner = (NamedCallPartner)partner;  
        this.PartnerRadTabItem.SetValue(RadTabItem.ContentProperty, new NamedCallPartnerView(this, (NamedCallPartner)partner));  
    }  
    else if (PartnerType == typeof(AnonymousCallPartner))  
    {  
        this._selectedPartner = (AnonymousCallPartner)partner;  
        this.PartnerRadTabItem.SetValue(RadTabItem.ContentProperty, new AnonymousCallPartnerView(this, (AnonymousCallPartner)partner));  
 
    }  
    else 
        ClientErrorHelper.ShowError(new Exception("Stuff went wrong"));  
 
    } 

 

I have tried it as just setting the content property directly as well. Basically it works for the first assignment to the content property and then all other setting attempts although the radtabitem.content property changes, the user control displayed in the tab does not change.

 

 

 

 

 

 

Miro Miroslavov
Telerik team
 answered on 15 May 2010
5 answers
569 views
HI Team,

I'm Using Rad Drop Down Button. Can we bind dynamic data to it. Is there any thing similar to Itemssource kind of thing.
Please do needfull to me. Its an Ugent requirement.
Tina Stancheva
Telerik team
 answered on 15 May 2010
4 answers
207 views

I’m using a generic item wrapper defined as below:

    public class ItemWrapper

    {

        public State State { get; set; }

        public string Message { get; set; }

        public object Item { get; set; }

    }

    public enum State

    {

        Ok,

        Warning,

        Error

    }

 

The ItemWrapper could contain objects from different classes in the Item property; for instance:

 

ItemWrapper wrapper = new ItemWrapper();

wrapper.Item = new Company() {Id = "Acme", Desc="Acme company" };

 

The point is how to bind RadGridView columns to show both ItemWrapper columns (State and Message) and wrapped object columns ( Company.Id and Company.Desc).

Binding ItemWrapper properties is ok while the expected way for Company should be:

col.DataMemberBinding = new Binding("Item.Id");

col.DataType = typeof(string);

 

that seems, at least, to work but raising lot of exceptions:

A first chance exception of type 'System.ArgumentException' occurred in Telerik.Windows.Data.dll

 

that slow down rows loading to several second for few items (making control unusable) .

Sincerely

Stefan Dobrev
Telerik team
 answered on 14 May 2010
2 answers
645 views

I need to be able to filter the RadGridView based on a collection property on each item. Here is a sample to illustrate my case. Let’s suppose that each item in the grid is of type Person and each person has a collection property ScheduledMeetings. I need to apply some kind of filter that does the following:

People.Where(p => p. ScheduledMeetings.Contains(someMeeting))

which will return all people participating in the specified meeting.

The documentation samples all use the built-in CreateFilterExpression method of the FilterDescriptor class. So my first choice was to use the existing FilterDescriptor class in combination with FilterOperator.Contains but it seems that ‘Contains’ only works with strings and not with IEnumerable (even with FilterDescriptor.MemberType specified)!

 I suppose I need to implement some custom FilterDescriptor class inheriting from FilterDescriptorBase and then provide the Expression from the CreateFilterExpression override. But how do I create such expression?

Todor
Top achievements
Rank 1
 answered on 14 May 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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?