Telerik Forums
UI for WPF Forum
9 answers
140 views
Hi there,

i'm having a strange issue with my gridview control in that when i set autogeneratecolumns to true and bind to a dataset, i am able to input values into cells and exit edit mode with the values still present in the cells but not so if i generate these columns programmatically.

i had to switch to programmatic cell loading because we need to load a dynamic list of columns to the grid based on user selections and so certain columns would only be added under certain conditions. however when i add a column to the grid, any input that i make in the cell just gets lost as soon as i exit edit mode.

this is how i create and add the gridviewdatacolumn:

GridViewDataColumn min = new GridViewDataColumn();
            min.UniqueName = "minCol";
            min.Header = "Min";
            min.FooterTextAlignment = TextAlignment.Right;
            min.TextAlignment = TextAlignment.Right;
            min.DataMemberBinding = new Binding("Min");
            min.DataType = Type.GetType("System.Int32");
            min.AggregateFunctions.Add(new SumFunction { SourceField = "Min"});
            radStoreGrid.Columns.Add(min);

what am i doing wrong? i've been sitting with this for over an hour and i just don't see the difference between this and the xaml declaration which worked fine...

thanks,
Nemanja
Maya
Telerik team
 answered on 13 Jun 2011
9 answers
175 views
hi
i need return all item rad tree view in hierarchical mode?
Davood
Top achievements
Rank 1
 answered on 12 Jun 2011
2 answers
98 views
Hi,
I use RadGridView in Grid panel:
<Grid.RowDefinitions>
    <RowDefinition Height="60"/>
    <RowDefinition Height="500"/>
</Grid.RowDefinitions>
The first row is Header and the second one RadGridView.
It works fine according to performance.


<Grid.RowDefinitions>
    <RowDefinition Height="60"/>
    <RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
On the other hand this RadGridView works fine according to flexibility but not UI performance.


How to achieve such effect like having RadGridView fast UI and on the other hand when user change size of the window,
RadGridView also adjust visible amount of rows to fulfill window size.
Thanks in advance.
Robert
Robert
Top achievements
Rank 1
 answered on 11 Jun 2011
0 answers
163 views
Hi,

I get two crashes when adding a new appointment in a RadScheduleView.
The type of the appointments is a custom BFAppointment class that I made which inherits from AppointmentBase.
The type of the AppointmentsSource of the control is a BFAppointmentList class I made, and this one inherits from ObservableCollection<BFAppointment>, so this shouldn't be an INotifyCollectionChanged bug.

The two crashes are:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
   at System.Windows.Data.ListCollectionView.CancelNew()
   at Telerik.Windows.Controls.ScheduleView.ScheduleViewDataConnection.HackCollectionViewBug(Boolean isCommit) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleViewDataConnection.cs:line 875
   at Telerik.Windows.Controls.ScheduleViewBase.CommitNew(IAppointment appointment) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Editing.cs:line 341
   at Telerik.Windows.Controls.ScheduleViewBase.Commit() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Editing.cs:line 253
   at Telerik.Windows.Controls.ScheduleViewBase.OpenAppointmentDialog(Occurrence occurrence, AppointmentViewMode viewMode) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.EditingWithDialogs.cs:line 297
   at Telerik.Windows.Controls.ScheduleViewBase.CreateAppointmentWithDialog(Object parameter) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.EditingWithDialogs.cs:line 82
   at Telerik.Windows.Controls.ScheduleViewBase.OnCreateAppointmentExecuted(Object sender, ExecutedRoutedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Commands.cs:line 166
   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
...


and:

System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.
Parameter name: value
   at System.DateTime.AddTicks(Int64 value)
   at System.DateTime.Add(Double value, Int32 scale)
   at Telerik.Windows.Controls.DateTimeExtensions.SubtractInterval(DateTime dt, DateTimeInterval dateTimeInterval) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Extensions\DateTimeExtensions.cs:line 17
   at Telerik.Windows.Controls.ScheduleViewBase.GetFirstPartOfOccurrencesWithNoEndDates(DateSpan range, IEnumerable`1 source, Boolean moveForward, DateTimeInterval interval) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Common.cs:line 3571
   at Telerik.Windows.Controls.ScheduleViewBase.HasAppointmentsInRange(DateSpan range, Boolean skipIntersectedWithTheRangeAppointments, Boolean moveForward, DateTimeInterval interval) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Common.cs:line 1316
   at Telerik.Windows.Controls.ScheduleViewBase.OnQueryGoToPreviousAppointmentCanExecuted(Object sender, CanExecuteRoutedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Commands.cs:line 300
   at System.Windows.Input.CommandBinding.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e)

...

I have some custom code when creating an appointment, as shown here:

void m_scheduleView_AppointmentCreating( object sender, AppointmentCreatingEventArgs e )
        {
            BFAppointment appointment = e.Appointment as BFAppointment;
            appointment.Schedule = ViewModel.BaseEntity;

            ScheduleTimespan timespan = new ScheduleTimespan();
            timespan.ScheduleId = ViewModel.BaseEntity.Id;

            appointment.TimespanViewModel = new ScheduleTimespanViewModel( timespan, ServiceLocator.Get<IEntityManager>() );
        }

        /// <summary>
        /// Handles the display of default Telerik dialogs to cancel them and substitute mine.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RadScheduleView_ShowDialog(object sender, ShowDialogEventArgs e)
        {
            // Dialog used to ask if we want to edit only the current occurrence or the whole series.
            // Since we ONLY support series, we skip the dialog.
            if ( e.DialogViewModel is RecurrenceChoiceDialogViewModel )
            {
                RecurrenceChoiceDialogViewModel vm = e.DialogViewModel as RecurrenceChoiceDialogViewModel;

                vm.IsSeriesModeSelected = true;
                e.DefaultDialogResult = true;
                e.Cancel = true;
            }
            // Replace the Telerik occurrence editor with our own.
            else if ( e.DialogViewModel is AppointmentDialogViewModel )
            {
                AppointmentDialogViewModel vm = e.DialogViewModel as AppointmentDialogViewModel;
                BFAppointment appointment = ( vm.Occurrence.Appointment as BFAppointment );

                if ( appointment.TimespanViewModel != null )
                {
                    // Show a window to edit the appointment.
                    ScheduleTimespanViewModel timespanVM = appointment.TimespanViewModel;

                    ScheduleTimespanControl control = new ScheduleTimespanControl() { ViewModel = timespanVM };
                    GenericEditableWindow window = new GenericEditableWindow( control, "ScheduleProperties", ServiceLocator.Get<IMainWindow>() as Window, GenericEditableWindowModeEnum.OK );
                    window.ShowDialog();
                }

                e.DefaultDialogResult = true;
                e.Cancel = true;
            }
        }

Setting e.Handled = true; in the AppointmentCreating event doesn't fix the issue.
Any pointers would be greatly appreciated.

Sebastien
Sébastien
Top achievements
Rank 1
 asked on 10 Jun 2011
4 answers
136 views
Hi.

I want to know, How can i achieve the func for disabling the certain rows in my grid which are not fulfill the criteria. For eg. I just want to enable only those rows whose shiptime is today. I' using the MVVM pattern.

Nikhil Jain
Top achievements
Rank 1
 answered on 10 Jun 2011
1 answer
86 views
Hi,

I was wondering if I can use the RadMap control to simulate the Interactive Directory Service in Malls and Buildings for the visitor to find their way. The direction locator, routing animation and such. Any suggestion for that, please? :)
Andrey
Telerik team
 answered on 10 Jun 2011
5 answers
163 views
GridView Not Loading in Word Addin TaskPane

We try to load Gridview in WPF XAML design time,but it is not loading.IF we try to load at runtime  by using c# code it works and added in Task Pane.


May i know how to fix the issue.


Thanks,
Anand
Anand
Top achievements
Rank 1
 answered on 10 Jun 2011
0 answers
95 views
I have Location list in a combobox .Need to call the method get employee by location and need to bind the name and id with the grid column on the combobox selection changed event....
Plz share code
swati
Top achievements
Rank 1
 asked on 10 Jun 2011
1 answer
510 views
Hi Telerik, All

I have GridView with GridViewSelectColumn and if i select couple of rows then apply filters then clear filters my all Selections is gone, means all previously selected rows become unselected.

is there anything i can do to retain same selection if i apply filter then clear filters

e.g
1. I have 5 rows 3 with Country US and 2 with Canada
2. Now i selected Canada rows
3. Apply filter on Country to US
4. only 3 rows visible "US"
5. Now clear filters
6. All 5 rows visible
7. All selected rows become unselected.


I want to keep that Canada rows selected.

I have used RadGriView in Winforms with filters and all my selections remmain selected even after filtering, so why WPF cant keep?


Kind Regards:
Maya
Telerik team
 answered on 10 Jun 2011
8 answers
201 views
Hi,

each items in my caroussel come from numerized 8x11 paper image. I use a caroussel because some document contains more than 1 page. I would like to know if it's possible to have each item display using their real size. If an image height are bigger than the display area, of course I would like to have to possibility to scroll  the image vertically to see their missing part.

Maybe I'm not using the right component, I don't know... What we have to consider is the fact that I need to display document with 1 or more pages (max 3 pages) using their real size to see all the infos on the documents.

Thank's
Maya
Telerik team
 answered on 09 Jun 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?