Telerik Forums
UI for WPF Forum
1 answer
125 views
Hi All

I am getting the following error when adding or removing objects from an observable collection in the ViewModel from which the RadBook is bound to :
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.Book.BookPanel.MeasureOverride(System.Windows.Size availableSize = {System.Windows.Size}) Line 181

Its Looking for this file:
c:\Builds\WPF_Scrum\Navigation_WPF_2010_Q1\Sources\Development\Controls\Navigation\Book\BookPanel.cs

This is very urgent as the error was not detected during testing, is very random in its nature and is in a production system.

Regards

Nick
Kiril Stanoev
Telerik team
 answered on 17 Jun 2010
3 answers
121 views
Hello,

When I press the Ctrl+C inside GridView, I get following exception

Am I doing something wrong?

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.GridView
  StackTrace:
       at Telerik.Windows.Controls.GridViewExportWriter.RenderDataCells(Object item)
       at Telerik.Windows.Controls.GridViewExportWriter.RenderDataRows(IEnumerable items)
       at Telerik.Windows.Controls.GridViewExportWriter.Render()
       at Telerik.Windows.Controls.GridView.GridViewDataControl.Export(Stream stream, GridViewExportOptions options)
       at Telerik.Windows.Controls.ExportExtensions.GetContent(ExportFormat format, GridViewDataControl source, Boolean includeHeader, Boolean includeFooter, IEnumerable items)
       at Telerik.Windows.Controls.ExportExtensions.ToCsv(GridViewDataControl source, IEnumerable items, Boolean includeHeader)
       at Telerik.Windows.Controls.GridView.GridViewDataControl.CopyExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
       at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       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.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
       at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
       at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
       at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
       at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       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.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
       at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
       at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
       at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
       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)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
       at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)
       at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Kymdata.CableTool.UI.App.Main() in C:\DEV\CMT\UI\obj\x86\Debug\App.g.cs:line 50
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:


Vlad
Telerik team
 answered on 17 Jun 2010
1 answer
125 views
Sorting and filtering on image columns looks to be disabled (for obvious reasons).

However, I have an image column that only displays one of two different images, bound to a URL. Let's say that these images represent YES or NO (but I want this to be displayed pictorially rather than as text or a checkbox).

Is there any way that I can sort or filter on this column, displaying the URL (or custom text basd on the URL) as the filter, for example.

Thanks.
jwhitley
Top achievements
Rank 1
 answered on 17 Jun 2010
4 answers
89 views
Hello,

My view has two GridViews controls.

When user selects several rows in first GridView I need to response to Ctrl+C and remember the rows he selected (I do not need to store data in a clipboard).

When user focuses second grid and presses Ctrl+V I need to copy selected rows from first to second grid.

I don't have problem coping these rows, I just to know how can I capture Ctrl+C and Ctrl+V when grids are focused.

Thank You!
Daniil
Top achievements
Rank 1
 answered on 17 Jun 2010
4 answers
170 views
hi,

I am trying to add a row in a grid that is insine a Pane Group. It works fine if the pane is docked, however, when it's in auto hide mode the property SelectedPane returns the pane that is docked behind it, and if there is no pane docked it returns a null pointer. How can I get the "focused" pane, instead of the selected pane? Thanks.
Miroslav Nedyalkov
Telerik team
 answered on 17 Jun 2010
5 answers
581 views

 

Hi,
  I have a telerik gridview control in wpf. I want to highlight the cells, which are going to be edited. I have a CellValidating eventhandler, inside the event I have written the code :

               GridViewCell cell = e.Cell;
                cell.Background = Brushes.Green;

The color of cell is not changing, if I am moving my cursor to the different row of grid. But if I am moving cursor to different cells in the same row of grid ,  the color of the cells , whatever editted is changed to "Green" as I have specified in CellValidating eventhandler. In both cases, cellValidating eventhandler is getting called, but changes in background color is not happened. Can any one please help me to resolve this issue.

Regards,
Rajesh
Vlad
Telerik team
 answered on 17 Jun 2010
1 answer
92 views
How can we use the RadChart controls with SQL 2005 Reporting Services.

Hristo
Telerik team
 answered on 17 Jun 2010
1 answer
110 views
Within a project I have a grid bound to a Index collection which is generated from a proxy service
 private void QueryActivities()  
        {  
            QueryClient qc = new QueryClient("BasicHttpBinding_IQuery");  
            QueryFilter filter = new QueryFilter();  
            filter.CallForService = cfsCB;  
            filter.NCICReturn = false;  
            filter.RMSQuery = false;  
            filter.DLSwipe = false;  
            filter.Booking = false;  
            filter.ArrestReport = reportCB;  
            filter.CustodyReport = reportCB;  
            filter.CitationReport = reportCB;  
            filter.FieldInterviewReport = reportCB;  
            filter.IncidentReport = reportCB;  
            filter.IncidentSupplimentReport = reportCB;  
            var actresult = qc.GetFilteredActivityIndex(filter);  
              
            this.actGridView.ItemsSource = actresult;  
 
        } 
The grid currentlty displays 5 (of 20) fields ( first name , last name, activity type, Address, and date )

I need to be able to select a row and return an assoicated ID field which is part of the index collection. ID is an actual object and not the index of [0]... of the colleciton or row.

Any samples or suggestions would be appreciated.

In the past I have seen examples such as

//placed in Window initialization  
 
this.actGridView.Loaded += (o, e) => 
          {  
              this.actGridView.SelectedItems.CollectionChanged += new NotifyCollectionChangedEventHandler(SelectedItems_CollectionChanged);  
          }; 
void SelectedItems_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)  
        {  
            if (e.Action == NotifyCollectionChangedAction.Add)  
            {  
                var person = e.NewItems[0] as People;  
                //PeopleView.SelectedPeople.Add(person); //writes selected values to selected people when row is selected.  
                myID = person.uniqueID;  
            }  
        } 
Where this has not worked is that I only want to captrure one value I do not want to recreate or build a new collection . Also using this approach the variable is attempted to be set when the grid loads however it is currently setting it to null or no value so I assume something is amiss either in the code or the approach I am taking.

Any suggestions on how to capture just one value of the collection which is not visually rendered in the grid vs rebuilding an entire collection would be greatly appreciated.

I am currently using the WPF desktop UI controls Q2 2010 ( 2010.1.603.35 )

Thank you
Randy
Yavor Georgiev
Telerik team
 answered on 17 Jun 2010
2 answers
295 views
Good day!
I have such a form:

<Grid x:Name="LayoutRoot">
<StackPanel x:
Name="spQuestions" Orientation="Vertical" Grid.Column="1" Grid.Row="8" Grid.ColumnSpan="3" HorizontalAlignment="Left">
</StackPanel>
<
/Grid>


and I put there a RadGridView using xaml.cs file:

RadGridView gridView = new RadGridView();
gridView.ItemsSource = 
question.Answers;
gridView.AutoGenerateColumns = false;
gridView.ScrollMode
 = Telerik.Windows.Controls.GridView.ScrollUpdateMode.RealTime;gridView.ShowGroupPanel = false;
spQuestions.Children.Add(gridView);

So I make my xaml dynamically.

Is it possible to make someting like such structure usin dinamic xaml
<telerikGridView:GridViewDataColumn Header="Варианты ответа" UniqueName="Name" MinWidth="300" MaxWidth="2000">
   <telerikGridView:GridViewDataColumn.CellTemplate>
       <DataTemplate>
          <RadioButton Content="{Binding Text}" FontFamily="Verdana" FontSize="13" Foreground="#FF170000" />
       </DataTemplate>
   </telerikGridView:GridViewDataColumn.CellTemplate>
</telerikGridView:GridViewDataColumn>


?
lina fetisova
Top achievements
Rank 1
 answered on 17 Jun 2010
5 answers
823 views
I have my data shown correctly in the gridview. Now I want to have them sorted by "Name" by default. How could I do that?

Thanks,
Yang
Yang Lu
Top achievements
Rank 1
 answered on 17 Jun 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
Slider
Expander
TileList
PersistenceFramework
DataPager
TimeBar
Styling
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
CardView
DataBar
WebCam
FilePathPicker
Licensing
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?