Telerik Forums
UI for WPF Forum
1 answer
157 views
Hi

I think I found a bug involving drag/drop on the radscheduler.
The synopsis is with RadPanel and RadScheduler. I drag an item from the panel and drop it on the scheduler and build an Appointment
It's working fine in general.

But if I slowly move the drag cue on an existing Appointment, immediatly when the cursor moves on the text displayed, the DragAndDropManager crashes. It works fine if I don't display Appointment.Subject.

I was able to solve the issue by creating an appointment template like this:

 

 

<DataTemplate x:Key="AppointmentTemplate">

 

 

 

<Border>

 

 

 

<TextBlock x:Name="PART_SubjectTextBox" Text="{Binding Path=Occurrence.Appointment.Subject}"></TextBlock>

 

 

 

</Border>

 

 

 

</DataTemplate>

 


 But I can't see any reason this solves the problem.
Please find bellow the crash report provided par VS if it may help.

My system is .NET 3.5, Windows XP Pro French.
---------------------------------

System.NullReferenceException was unhandled by user code
  Message="La référence d'objet n'est pas définie à une instance d'un objet."
  Source="Telerik.Windows.Controls"
  StackTrace:
       à Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.<FindDropZones>b__2(HitTestResult el) dans c:\Builds\WPF_Scrum\Core_WPF_2009_Q2_SP1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:ligne 1148
       à System.Windows.Media.Visual.HitTestPointInternal(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters hitTestParameters)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTestPoint(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, PointHitTestParameters pointParams)
       à System.Windows.Media.Visual.HitTest(HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback, HitTestParameters hitTestParameters)
  InnerException:
Miroslav
Telerik team
 answered on 05 Oct 2009
3 answers
134 views
I am trying to show textbox in grid cell performing aggregate function.
These underneath Xaml show textboxes but while editing  value in textbox,textbox disappear on double-click and when done with editing it re-appear again.and aggregate functions seem to work sometime.

Please help me..hoe to achieve textboxes in a gridcell with aggrgate functionality for that datacolumn

  <telerik:GridViewDataColumn Header="Term Leased"  ToolTip="Term Leased" HeaderTextAlignment="Center" DataMemberBinding="{Binding TERM_LEASED}" IsReadOnly="False"  >
  <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBox HorizontalAlignment="Center" VerticalAlignment="Top" Width="40" x:Name="TxtTermLeased" Margin="5,0" Text="{Binding TERM_LEASED}" >

                                            </TextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Term Leased: "  SourceField="TERM_LEASED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
Vlad
Telerik team
 answered on 05 Oct 2009
7 answers
501 views
Is there a practical limit to the number of rows in a GridView? I tried putting 4k in and get a memory exception. If I limit to 1k rows it works but I can see the system memory take a steep rise each time I refresh the grid. I have a similar application in WinForms and I can load 4k rows easily with no impact on system performance.
Hector
Top achievements
Rank 1
 answered on 02 Oct 2009
2 answers
429 views
I am attempting to create a Custom Item Template for my carousel that is bound to a datatable. The problem is that when I do the below XAML code, it displays System.DataRow.View or something like that instead of the actual data. I think it has something to do with not defining my data type. What should I put in the DataType property for my DataTemplate in the case that it is bound to a datatable?

<Grid.Resources> 
            <DataTemplate DataType="">  
                <Border Background="LightSlateGray" Padding="10">  
                    <Grid> 
                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="60" /> 
                            <ColumnDefinition Width="*" /> 
                        </Grid.ColumnDefinitions> 
                        <Grid.RowDefinitions> 
                            <RowDefinition Height="20" /> 
                            <RowDefinition Height="*" /> 
                        </Grid.RowDefinitions> 
                        <TextBlock Grid.Column="0" Grid.Row="0" Text="DocumentMasterID">  
                            <TextBlock.TextDecorations> 
                                <TextDecoration Location="Underline" /> 
                            </TextBlock.TextDecorations> 
                        </TextBlock> 
                        <TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding Path=Data[DocumentMasterID]}" /> 
                        <TextBlock Grid.Column="1" Grid.Row="0" Text="CleanLeadsID">  
                            <TextBlock.TextDecorations> 
                                <TextDecoration Location="Underline" /> 
                            </TextBlock.TextDecorations> 
                        </TextBlock> 
                        <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding Path=Data[CleanLeadsID]}" /> 
                    </Grid> 
                </Border> 
            </DataTemplate> 
        </Grid.Resources> 
Matt Tapia
Top achievements
Rank 1
 answered on 02 Oct 2009
5 answers
693 views

Hi, I've been confused by a problem. First, I set RadGridView.ItemSource with a ObservableCollection and selected a row. Then I removed an item from ObservableCollection, the RadGridView.SelectedItem changed to null and did't trigger SelectionChanged Event. Is that by desgin? Thanks.

Version: Q2 2009.2.813.35

zai yunfeng
Top achievements
Rank 2
 answered on 02 Oct 2009
1 answer
180 views
Hello,

Version: 2009.2.911.35 .

I defined three events:

RadGridView1_SelectionChanged
RadGridView1_MouseLeftButtonUp
RadGridView1_MouseUp

Because the "SelectionChanged" event, left click does not fire the other two events (only right click).

Is this by design ?

Thanks.

Milan
Telerik team
 answered on 02 Oct 2009
1 answer
91 views

Hello,

I have a problem with exporting RadGridView using ToCsv() andToExcelML() methods.

While using AutoGenerateColumns property set to true everything works fine. 

However, when I'm trying to create columns in code in such a way:

  Telerik.Windows.Controls.GridViewDataColumn c1 = new Telerik.Windows.Controls.GridViewDataColumn();  
  c1.Header = "Name";  
  c1.CellTemplate = (DataTemplate)this.Resources["NameColumnTemplate"];  
  radGridView.Columns.Add(c1); 

with DataTemplate defined in XAML:

  <DataTemplate x:Key="NameColumnTemplate">  
  <TextBlock Text="{Binding Path=Name}"/>  
  </DataTemplate> 

In this case everything looks fine and RadGridView displays columns properly, but ToCsv() methods creates a string consist only of white spaces.

Is there any solution to this problem?

Regards

Vlad
Telerik team
 answered on 02 Oct 2009
1 answer
142 views
Hi
I have a grid which I add rows to
when there is a vertical scroll
I want to see the added row
so I use
gvSystemTables.SelectedItem = gvSystemTables.Items[System.Convert.ToInt32(gvSystemTables.Items.Count) - 1];  
gvSystemTables.BringDataItemIntoView(gvSystemTables.Items[System.Convert.ToInt32(gvSystemTables.Items.Count) - 1]); 
the problem is
when the grid does not  have scroll
after I add a row the grid scrolls down
although there is enugh place and no need to scroll
any idea?
Nedyalko Nikolov
Telerik team
 answered on 02 Oct 2009
1 answer
318 views
Since RadWindow don't have closing event, how I can prevent closing a RadWindow? For instance prevent to close without save something.
Miroslav Nedyalkov
Telerik team
 answered on 02 Oct 2009
1 answer
150 views
Hi,
i'm  trying to bind a carousel with a CarouselDataRecordPresenter.

  • When i'm binding with a datatable, it's OK ( detail code see 1))
  • When i'm binding with an objet, the carousel have 2 elements but the property Lib of my object CarouselViewModel is not displayed ( detail code see 2).

     Remark:

     my visual Studio show me a error "Type or property expected " for the Data when i write the  Binding         Path=Data.CarouselViewModel.Lib

    When i don't use the  CarouselDataRecordPresenter, the carousel displays 2 elements with the name of property (LIB) and its Value.
    I tried other type of binding like Data[0] or Fields[Lib)..., but it doesn't work.  
    What's wrong with my binding? 

    Can you help me?

    1) BINDING with DATATABLE
    When i bind a carousel with a datatable , the carousel display the item of my row :
    In my code behind :

DataTable

 

dt = new DataTable();

 

 

DataColumn dc = new DataColumn("Lib");

 

dt.Columns.Add(dc);

 

DataRow dr = dt.NewRow();

 

dr[

"Lib"] = "Item1";

 

dt.Rows.Add(dr);

dr = dt.NewRow();

dr[

"Lib"] = "Item2";

 

dt.Rows.Add(dr);

sampleRadCarousel.ItemsSource = dt;

In my Xaml :

 

 

<Style TargetType="{x:Type Controls:CarouselDataRecordPresenter}">

 

 

 

<Setter Property="Template">

 

 

 

<Setter.Value>

 

 

 

<ControlTemplate TargetType="{x:Type Controls:CarouselDataRecordPresenter}">

 

 

 

<StackPanel Margin="0,20,0,0" TextElement.FontWeight="Bold">

 

 

 

<Label Content="{Binding Path=Data[Lib]}"/>

 

 

 

<Label Content="test"/>

 

 

 

</StackPanel>

 

 

 

</ControlTemplate>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

</Style>

 

2) BINDING MODELVIEW
In code behind 

Collection

 

<CarouselViewModel> ListeCarousel = new Collection<CarouselViewModel>();

 

 

CarouselViewModel carouselview = new CarouselViewModel("item1");

 

ListeCarousel.Add(carouselview);

 

CarouselViewModel carouselview1 = new CarouselViewModel("item2");

 

ListeCarousel.Add(carouselview1);

sampleRadCarousel.ItemsSource = ListeCarousel;

In xaml :

 

 

<Style TargetType="{x:Type Controls:CarouselDataRecordPresenter}">

 

 

 

<Setter Property="Template">

 

 

 

<Setter.Value>

 

 

 

<ControlTemplate TargetType="{x:Type Controls:CarouselDataRecordPresenter}">

 

 

 

<StackPanel Margin="0,20,0,0" TextElement.FontWeight="Bold">

 

 

 

<Label Content="{Binding Path=Data.CarouselViewModel.Lib}"/>

 

 

 

<Label Content="2"/>

 

 

 

<Label Content="3"/>

 

 

 

</StackPanel>

 

 

 

</ControlTemplate>

 

 

 

</Setter.Value>

 

 

 

</Setter>

 

 

 

</Style>

 


 
Milan
Telerik team
 answered on 01 Oct 2009
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?