Telerik Forums
UI for WPF Forum
0 answers
106 views
Hi,
I want to create this behavior:

I want to be able to select only full lines, act on double click on the line -

currently I have 2 problems with this code:

<telerik:RadGridView Name="gdTestRecords" DockPanel.Dock="Bottom" AutoGenerateColumns="False" ClipboardCopyMode ="All" MouseDoubleClick="gdTestRecords_MouseDoubleClick" SelectionMode="Extended" SelectionUnit="FullRow" MaxHeight="600" ScrollViewer.VerticalScrollBarVisibility="Visible">


1, when I double click inside the line - it selects the cell and not the line - I can only choose the line by clicking on the edge of the line.
    this code will return null: RecordType st = ((FrameworkElement)e.OriginalSource).DataContext as RecordType (unless I click on the edge)
2. when I click on the vertical scroll bar more than 2 times - it acts like selecting a cell ! - I need to interpreting clicking on scroll bar as clicking on the grid surface....

How can I fix this ?
dani
Top achievements
Rank 1
 asked on 03 Feb 2013
0 answers
132 views
Hi ,

I have a applicaiton whcih is having one text box. i want  to enter text inside that text box character by character. on entering text one search button will be enable. here i am able to enter the characters but that button is not enabling. it is enabling on keyboard input.

How to enter the keyboard into perticular textbox.

Thanks
satyanarayana
satyanarayana
Top achievements
Rank 1
 asked on 02 Feb 2013
0 answers
115 views
Hi ,

I have a Web application, in this one of the page is consists of a textbox which user can enter text. On enter the text one search button will be enable.
i am able to enter the text inside the textbox but the button is not getting enable. is there any chance to enter the text as character by character.

Thanks
satyanarayana
S
Top achievements
Rank 1
 asked on 02 Feb 2013
0 answers
403 views
Fairly new to MVVM and learing as I go.  A little stuck on the proper usage of
Telerik.Windows.Controls DelegateCommand
.  I have the below set up, which compiles, however I am more concerned with, whether, I am using it correctly.  I have searched the Online Doc for a while now and couldn't find any examples.

Particularly, I am confused as how I would use the CanSaveAuthorization, or the underlying CanExecute, and what I would do with the object parameter that is required.

Thanks,

    

public class CreateAuthorizationViewModel : ViewModelBase
    {
        private Authorization authorization;
        private AuthorizationRepository authorizationRepository;
        private DelegateCommand saveAuthorizationCommand;
        public DelegateCommand SaveAuthorizationCommand
        {
            get
            {
                return saveAuthorizationCommand;
            }
        }
  
        public CreateAuthorizationViewModel()
        {
            InitializeCommand();
        }
        private void InitializeCommand()
        {
            saveAuthorizationCommand = new DelegateCommand(SaveAuthorization, CanSaveAuthorization);          
        }
  
        private void SaveAuthorization(object parameter)
        {
            authorizationRepository.Save();
        }
        private bool CanSaveAuthorization(object parameter)
        {
                  //I would have validation logic here
            return true;
        }
    }
Patrick
Top achievements
Rank 2
 asked on 01 Feb 2013
1 answer
97 views

This is the border of the RadPropertyGrid with Expression_DarkTheme :

http://img163.imageshack.us/img163/4715/capturemft.png 

I want to apply the same border at a Rectangle.

rect = new Rectangle();
rect.Stroke = Brushes.?;

But i don't know what brushes to use...

Thanks for your help !

Ivan Ivanov
Telerik team
 answered on 01 Feb 2013
5 answers
206 views
Hi,

When editing a value in a GridView Cell, I get an exception when pressing Enter. My entered value is accepted however.
I am using Version 2012 Q2 SP1

   at Telerik.Windows.Controls.StyleManager.GetTheme(DependencyObject element) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Common\StyleManager.cs:line 85
   at Telerik.Windows.Controls.GridView.GridViewCell.get_EditorPresenter() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 240
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ValidateCell(GridViewCell cell) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 285
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformCellValidation(GridViewCell cell) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 214
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CommitCellEdit(GridViewCell currentCell, Boolean isLeavingRow) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 60
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CommitEdit() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 1105
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCommitEditCommand(Object sender, ExecutedRoutedEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 298
   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.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Input.RoutedCommand.Execute(Object parameter, IInputElement target)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ExecutePendingCommand() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 73
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PendAndExecuteCommands(KeyEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3940
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnKeyDown(KeyEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3913
   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.TranslateAcceleratorCore(MSG& msg, ModifierKeys modifiers)
   at System.Windows.Interop.HwndSource.System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   at System.Windows.Forms.Integration.ElementHost.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at ProjectControl.Program.Main(String[] args) in C:\Users\Marc.Vanhoecke\Documents\Visual Studio 2010\Projects\ProjectControl\ProjectControl\Program.cs:line 31
   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()

I'm still using the Themes the old way. (telerik:StyleManager.Theme="Windows7") in XAML

Best regards,
Henri
Yordanka
Telerik team
 answered on 01 Feb 2013
1 answer
94 views
I know there are some limitations on pictures, encoding and other things, but would it be possible to show an error message saying it's can't load this pdf?  99% of the files I think will work, but if a client tries to use a file that doesn't load correctly I'd like it to give an error message and say to download the file instead.
Kammen
Telerik team
 answered on 01 Feb 2013
5 answers
396 views
Hi,

in my project I have a method who need parameters and one of them is an object that I want the persistence stream result.
When I call my method, the PersistenceError event handler was called when I try to use the SAVE method of the PersistenceManager and I get the following french error message: Nombre de paramètres incorrects.

Here is the way I call my method:

PersistenceStorage

 

.Persist(MainGrid, ref stream, PersistenceStorage.PersistenceAction.Save, out errMsg);

 



Here is my static object with my method:

static

 

public class PersistenceStorage

 

{


static public bool Persist(object pObject, ref Stream pStream, PersistenceAction pPersistenceAction, out string pErrorMessage)

 

{

mResult =

true;

 

pErrorMessage =

string.Empty;

 

 

PersistenceManager manager = new PersistenceManager();

 

manager.PersistenceError +=

new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);

 

 

try

 

{

 

if (pPersistenceAction == PersistenceAction.Load)

 

{

 

if (pObject != null && pStream != null)

 

{

pStream.Position = 0L;

manager.Load(pObject, pStream);

}

 

else

 

{

mResult =

false;

 

}

}

 

else if (pPersistenceAction == PersistenceAction.Save)

 

{

 

if (pObject != null)

 

{

pStream = manager.Save(pObject);

}

 

else

 

{

mResult =

false;

 

}

}

}

 

catch

 

{

mResult =

false;

 

}

 

finally

 

{

manager.PersistenceError -=

new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);

 

pErrorMessage = mErrorMessage;

}

 

return mResult;

 

}

 


static
void manager_PersistenceError(object sender, Telerik.Windows.Persistence.Events.PersistenceErrorEventArgs e)

 

{

mErrorMessage = e.Exception.Message;

mResult =

false;

 

}

 


public
enum PersistenceAction { Load, Save }

 

 


static
private string mErrorMessage;

 

 

static private bool mResult;

 

}

Tina Stancheva
Telerik team
 answered on 01 Feb 2013
3 answers
126 views
Hi

I want to be able to drop a file from the desktop on to an existing row in a RadGridView. (The event handler will then do something with the file and manipulate the data for that specific row, but that isn't relevant for this discussion.)

Can anybody shed some light on how this can be achieved? I have managed to drop a file on the the RadGridView component itsself, but that's not what I want. I need to be able to drop on a specific row (or preferably have the option to drop on the RadGridView also if it doesn't conflict).

I am finding the Telerik documentation about drag and drop (using DragDropManager) hard to figure out since some of the examples just don't work (http://www.telerik.com/help/wpf/dragdropmanager-getting-started.html) and many of the example projects referred to in prior forum solutions seem to use the RadDragAndDropManager which I understand is soon to be obsoleted.

Anybody? 
Nick
Telerik team
 answered on 01 Feb 2013
0 answers
69 views

We are facing a problem while adding steps in Test studio.

When we are working web and wpf at a time we are not a able to add new steps into Wpf test and while adding the code which is lies in Webtest that is deleting.

Please let me know solution for this problem.

Please find the attachment of error message which we are getting while adding steps.

satyanarayana
Top achievements
Rank 1
 asked on 01 Feb 2013
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
Nakul
Top achievements
Rank 1
Rina
Top achievements
Rank 1
Mukesh
Top achievements
Rank 1
Ruksana
Top achievements
Rank 1
Rakesh
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Nakul
Top achievements
Rank 1
Rina
Top achievements
Rank 1
Mukesh
Top achievements
Rank 1
Ruksana
Top achievements
Rank 1
Rakesh
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?