Telerik Forums
UI for WPF Forum
2 answers
165 views
Hi

I have a RadGridView bound to a object data source. This data source has certain properties with values Y/N. I would like to display the value of this property as a checkbox in the grid. I would like to create the column from source code. Data cannot be edited in the grid in my scenario, the grid is used only to display the data.

I have tried to add a converter to the binding, which has converted Y/N to True/False, but still, the grid view display this as a string, not as a checkbox. Then, I have tried to change the DataType for the column to bool, but the result was only a few empty cells (without the strings or checkboxes). 

My code is the following:
...
new GridViewDataColumn()
{ Header = header,
   DataType=typeof(bool),
   IsAutoGenerated=false,
   DataMemberBinding = new System.Windows.Data.Binding(property.GetMemberName()) { Converter = converter }};

Is there any way to make this work, or what is the easiest way to solve the problem?



Thanks for the help in advance!

Cheers,
             G. M.
Gergely
Top achievements
Rank 1
 answered on 03 Jan 2011
4 answers
113 views
I'm having a problem with drag-and-drop in the ScheduleView. Essentially, I'm trying to disable ALL drag-and-drop on the ScheduleView and have set every property and attached property I can think of, but I'm still getting the following error if I click an appointment in the view and move the mouse around just a pixel or two. I CAN double-click an appointment and bring up a custom dialog box and that's all working fine. But obviously accidentally initiating a drag-and-drop operation results in the following error:

"Object reference not set to an instance of an object"

The stack trace is:

Telerik.Windows.Controls.AppointmentItem.OnAppointmentItemsDragQuery(Object sender, DragDropQueryEventArgs e)
   at Telerik.Windows.Controls.DragDrop.DragDropQueryEventArgs.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.RaiseEvent(RoutedEventArgs e)
   at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.DragDropProvider_DragQuery(Object sender, DragDropQueryEventArgs e)
   at Telerik.Windows.Controls.DragDrop.DragDropProviderBase.RaiseDragQuery()
   at Telerik.Windows.Controls.DragDrop.WPFSimulatedDragDropProvider.TryStartDrag(IMouseEventArgs e)
   at Telerik.Windows.Controls.DragDrop.SimulatedDragDropProvider.OnTrackedElementMouseMoveInternal(IMouseEventArgs e)
   at Telerik.Windows.Controls.DragDrop.SimulatedDragDropProvider.OnCoverRectangleMouseMoveInternal(IMouseEventArgs e)
   at Telerik.Windows.Controls.DragDrop.WPFSimulatedDragDropProvider.OnCoverRectangleMouseMove(Object sender, MouseEventArgs e)
   at System.Windows.Input.MouseEventArgs.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.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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 numAr

Any ideas?

Thanks,
Greg
Rosi
Telerik team
 answered on 03 Jan 2011
6 answers
292 views
hii,
I am trying to create an application in which I want to drag an item from a treeview and drop it in radgridview with MVVM. Here I used attached command behaviour. When these drag and drop feature applied in simple code behind way it works properly. In MVVM it doesnot work.

So please give me some solution for this problem with samples.

Thanks.
Alpa.
Alpa
Top achievements
Rank 1
 answered on 03 Jan 2011
2 answers
131 views
Hi
           i have one clarification.we are using telerik rad controls in our project.
My problem about tab index in radcolorpicker control.
our layout design is having 25 fields.They are textbox,combobox,radiobuttons,etc...with only one radcolorpicker.
24th control is radcolorpicker in our project.Here i am setting tab index in  starting 1 to 25 in orderly.

also set radcolorpicker tabindex is 24.

i don't use mouse.working only tab.
if i put values in run time the tab will goes correctly.but finaly completed 25th field then CURSOR AGAIN COMES RADCOLORPICKER CONTROL.
That is my problem.here i want cursor in first field.

pls give me correct solution?
sivakanth
Top achievements
Rank 1
 answered on 31 Dec 2010
2 answers
74 views

Hello,

I am testing the RadControll for wfp with PRISM. I am using the RadPaneGroupRegionAdapter which I came across in this forum and all is working fine in default configuration.

I would like to know how to make any new  RadPanes added to the region ( implemented as a RadPaneGroup) to dock to the left by default.

I am using Telerik 2010 Q3, VS 2010, MSDOTNET 4.0

Any assistance on this matter is much appreciated

Cheers

Chintana
Top achievements
Rank 1
 answered on 31 Dec 2010
1 answer
294 views
Hi,

I have a WPF application with well defined Button style. I would like to use Telerik Button but I would like to use my own Style.

My Style is in the Application Resource and applies to all standar WPF buttons, except for Telerik. By the way My TabDividers also have an Application Resources Style and I presume the same thing will happen with Telerik Tab.

How Can I use my resource Styles it with Telerik controls.

Thanks in advance
Tina Stancheva
Telerik team
 answered on 30 Dec 2010
0 answers
144 views
Hi ,

How I can get the all Child Items of a Parent.

we are able to find the parent RadTreeListViewRow but could not find child row.

we tried below code but it is not working for us. 
  <>var Child = ((currentControl as Telerik.Windows.Controls.TreeListView.TreeListViewRow).ParentRow as Telerik.Windows.Controls.TreeListView.TreeListViewRow).ChildrenOfType<TreeListViewRow>();


Please suggest how to find all child row given a parent.
Sharada
Top achievements
Rank 1
 asked on 30 Dec 2010
4 answers
59 views

Hello

Can I add items to combo box column like in the combo box?

Like this

 

<telerik:RadComboBox >
         <telerik:RadComboBoxItem Content="Item1" />
         <telerik:RadComboBoxItem Content="Item2" />
         <telerik:RadComboBoxItem Content="Item3" />
</telerik:RadComboBox>

 

Best regards

Ehud

Avi Avni
Top achievements
Rank 1
 answered on 30 Dec 2010
3 answers
141 views
Hi

 I am using TreeListView. 
 I am adding columns dynamically at runtime

GridViewDataColumn

 

 

column;

 

 

 

for (int icnt = 1; icnt < ts.Days; icnt++)

 

{

column =

 

new GridViewDataColumn();

 

column.UniqueName =

 

"key" + icnt.ToString();

 

column.IsReadOnly =

 

false;

 

RadTreeListView1.Columns.Add(column);

}


I am populating the cell data in RadTreeListView1_RowLoaded event.

 

var

 

 

row = e.Row as TreeListViewRow;

 

 

 

foreach (GridViewCell cell in row.Cells)

 

{

 

 

if (cell.IsLoaded)

 

{

 

 

DateTime dates;

 

 

 

if (DateTime.TryParse(cell.Column.Header.ToString(), out dates))

 

{

 

 

string filter = "dates = '#" + dates.ToShortDateString().ToString() + "#'";

 

 

 

DataRow[] dr = lobjdt.Select(filter);

 

 

 

if (dr != null && dr.Length > 0)

 

{

cell.Content = dr[0][

 

"hours"].ToString();

 

}

}

}

}

I am facing one problem here.
Data in dynamic columns will populate only when columns are visible , data wont get populate if columns are not
visible.

I guess there is a problem with virtulisation while horizontal scrolling..

Please suggest.

Sharada
Top achievements
Rank 1
 answered on 30 Dec 2010
1 answer
45 views
Formatted Text when pasted onto Grid comes with additional double quotes ("") surrounding it. Why is that so? I tried pasting following data from excel to grid.

237 Customer 4579 70 16-Sep-21
3259 Customer 1614 42 12-Mar-17
9588 Customer 4777 81 08-Oct-37
4099 This
is
a
<Formatted>
Text.
45 08-May-16

It appeared on grid like this:

237 Customer 4579 70 16 Sep 2021
3259 Customer 1614 42 12 Mar 2017
9588 Customer 4777 81 08 Oct 1937
4099 "This
is
a
<Formatted>
Text." 45 08 May 2016
Yavor Georgiev
Telerik team
 answered on 30 Dec 2010
Narrow your results
Selected tags
Tags
+? 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?