Telerik Forums
UI for WPF Forum
1 answer
171 views
Hi all,

This is reposted from another question (http://www.telerik.com/community/forums/wpf/charting-kit/panzoombars-missing-when-chart-built-from-code.aspx) for clarification.

I am having trouble programmatically add/removing the PanAndZoom functionality for ChartView. I have tried several ways of doing it, and the problem essentially boils down to this: the only way to get pan and zoom bar to show up, I have to include it in the XAML file. Furthermore, if I ever decide to set the Pan/Zoom mode to "None" programmatically, the pan and zoom bar is gone forever, even if I set the mode back to "Both".

Is there a work around to allow users to programmatically enable/disable pan and zooming for a given ChartView?

Thanks,
Jin
Ves
Telerik team
 answered on 13 Aug 2012
1 answer
121 views
Dear support, 
     there is a way to define a single comment on read-only state ?

Thanks in advance.
Kind regards.

Todor
Telerik team
 answered on 13 Aug 2012
1 answer
139 views
Hi..
When I set the itemsource on my App on the production server crashes. I have try /catch around the  code but it never hits the catch.

I get a general .Net unhandled exception and my app crashes.

here's the line
     this.gridUnassigned.ItemsSource = query.ToList();

Retrieving the data causes no errors.. the above line causes the app to crash. I even removed the formatting / binding of the grid
and that did not help

any ideas???   Help

I can't debug it on the prod server.. using Visual Studio
Dimitrina
Telerik team
 answered on 13 Aug 2012
1 answer
413 views

I am using a GRadGridView("CustomerRadGrid") which is initially bounded to a empty ObservableCollection(CustomerCollection) and RadButton. The User should be able to add Rows to the Grid and Add Button ("AddCustomerBttn") adds all rows with user entered values to the ObservableCollection(CustomerCollection). I was able to get the value of the Fisrt Cell with this code.

string custName = row.ChildrenOfType<GridViewCell>().Where(c => c.Column.UniqueName == "CustomerName").FirstOrDefault().Value.ToString();

How to get value of GridViewDataColumn(CheckBox) in ViewModel?

View

<telerik:RadGridView ItemsSource="{Binding CustomerCollection,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"

                                         AutoGenerateColumns="False"

                                         CanUserInsertRows="True" ShowInsertRow="True"

                                         Name="CustomerRadGrid">

<telerik:GridViewMaskedTextBoxColumn UniqueName="CustomerName" Header="Name"  DataMemberBinding="{Binding FirstName}"                                                                  MaskType="None"/>

<telerik:GridViewDataColumn UniqueName="IsMail">

   <telerik:GridViewDataColumn.Header>

      <StackPanel>

          <TextBlock Text="Mailing and Shipping Address Same?" />

      </StackPanel>

</telerik:GridViewDataColumn.Header>

<telerik:GridViewDataColumn.CellTemplate>

      <DataTemplate>

         <StackPanel HorizontalAlignment="Center">

            <CheckBox IsChecked="{Binding Path=IsAddressesSame, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/ >

         </StackPanel>

       </DataTemplate>

</telerik:GridViewDataColumn.CellTemplate>

</telerik:GridViewDataColumn>

</telerik:RadGridView>

<telerik:RadButton Name="AddCustomerBttn" Content="Add"

 Command="{Binding AddCustomerCommand

CommandParameter="{Binding ElementName=CustomerRadGrid}"/>

Model

 public class Customer : ViewModel.ViewModelBase

    {

        string name;

        public string Name //Product

        {

            get { return name; }

            set { name = value; NotifyPropertyChanged("Name"); }

        }

        bool isAddressesSame;

        public bool IsAddressesSame

        {

            get { return IsAddressesSame; }

            set { IsAddressesSame = value;NotifyPropertyChanged("IsAddressesSame "); }

        }

       

    }

}

ViewModel:

ObservableCollection<Customer> customerCollection = new ObservableCollection<Customer>();

        public ObservableCollection<Customer> CustomerCollection

        {

            get { return customerCollection; }

            set { customerCollection = value; NotifyPropertyChanged("CustomerCollection"); }

        }

  #region AddCustomerCommand  //Add

  public ICommand AddCustomerCommand { get; private set; }

  public HomeViewModel()

       {

AddCustomerCommand = new RelayCommand(Execute_AddCustomerCommand, CanExecute_AddCustomerCommand);

}

        public void Execute_AddCustomerCommand (object parameter)

        {

            RadGridView rGridView = (RadGridView)parameter;

           

            IList<GridViewRow> gViewRows = rGridView.ChildrenOfType<GridViewRow>().ToList();

            foreach (GridViewRow row in gViewRows)

            {

                string custName = row.ChildrenOfType<GridViewCell>().Where(c => c.Column.UniqueName == "CustomerName").FirstOrDefault().Value.ToString();

bool addressSame ;//Get Value from the .

//How to get value from GridViewDataColumn CheckBox(True if checked, False if unchecked)

                Customer temp = new Customer()

                {

                    Name = custName,

                    IsAddressSame = addressSame

                };

CustomerCollection.Add(temp);

            }         

           

        }

        public bool CanExecute_AddCustomerCommand (object parameter)

        {

                return true;

        }

        #endregion

Thank you,

-Prathibha

Dimitrina
Telerik team
 answered on 13 Aug 2012
1 answer
318 views
Hi.

I have a treeview with 3 levels in depth, first time everything looks fine, but when adding to a lower level then the root, it's not reflected.

<telerik:RadTreeView  Margin="8" ItemsSource="{Binding treeRoot}" ItemTemplate="{StaticResource Level1Template}" IsLineEnabled="True" SelectionChanged="JobDesign_SelectionChanged" x:Name="JobDesign"/>

These are my templates
<HierarchicalDataTemplate x:Key="Level3Template">
            <TextBlock Text="{Binding Name}" />
        </HierarchicalDataTemplate>
 
        <HierarchicalDataTemplate x:Key="Level2Template" ItemTemplate="{StaticResource Level3Template}" ItemsSource="{Binding Level3}" >
            <TextBlock Text="{Binding Name}" />
        </HierarchicalDataTemplate>
 
 
        <HierarchicalDataTemplate x:Key="Level1Template" ItemTemplate="{StaticResource Level2Template}" ItemsSource="{Binding Level2}" >
            <TextBlock Text="{Binding Name}" />
        </HierarchicalDataTemplate>


This is my Level1 class

public class Level1
    {
        public Level1()
        {
            this.Level2 = new List<Level2>();
        }
        public string Name
        {
            get;
            set;
        }
        public List<Level2> Level2
        {
            get;
            set;
        }
    }

level 2 and 3 are basicly the same

in the viewmodel file this it treeRoot:
public ObservableCollection<Level1> treeRoot { get; private set; }

when add items directly to treeRoot there is no problem.

But if I try to update in level2 like this:

Level1 jobPlanning = treeRoot.Where(t => t.Name.Equals("Job Planning")).Single();
            jobPlanning.Level2 = new List<Level2>();
 
                Level2 operation = new Level2()
                {
                    Name = "New Item"
                };
this.OnPropertyChanged(() => this.treeRoot);

But the treeview is not updated, what am I missing?
After I have add I can look in treeView and see that the new item has been added, but just not displayed.

Please help me.
Regards
Rune

Rune
Top achievements
Rank 1
 answered on 11 Aug 2012
5 answers
274 views
Is it possible to restore the original configuration of a RadDocking through code behind (panels, windows shrink, etc) after the user has "played" and changed the location and properties of these objects?

Ie set through code how the window was originally.

thanks
Lancelot
Top achievements
Rank 1
 answered on 10 Aug 2012
1 answer
59 views
I recently upgraded the dlls to the latest version (from q1) and now the chart is drawing... interesting lines when I zoom as much as I can and I'm at the end of the graph. Pics attached. Tried it on the q1 dlls and it doesn't do this. 
Yavor
Telerik team
 answered on 10 Aug 2012
0 answers
244 views

Hi Team,
I am using WPF  Radlistbox with MVVM pattern,

Here is my code.

<

 

 

Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">

 

<

 

 

Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />

 

</

 

 

Style>

 

 

 

 

 

<telerik:RadListBox>

 

 

 

 

<

 

 

telerik:RadListBox.DragVisualProvider>

 

<

 

 

telerik:ScreenshotDragVisualProvider />

 

</

 

 

telerik:RadListBox.DragVisualProvider>

 

<

 

 

telerik:RadListBox.DragDropBehavior>

 

<

 

 

telerik:ListBoxDragDropBehavior />

 

</

 

 

telerik:RadListBox.DragDropBehavior>

 

 

 

 

 

 

</

telerik:RadListBox>



 

I have source listbox and target listbox,
1 ) while drag and drop items from source listbox to target , the draged items from source should not be removed.
2) Taget List box should not allow any duplicate item(s) to drop.
these conditions should be same for single selection and Multiselection
3) Drag and drop on Source listbox  should be disabled.

along with I need the follwing features for Radlist box.

1)Multi-select available on BOTH sides and on all operations (right click, add, drag n drop) available
2)Multi-select is “sticky” (ie don’t need to use Ctrl) with reset button (clear selections). Add or double click operation will also reset.
3)Use of Shift+click will select everything in between last select.
4)Either box could have multiple columns (in which headings are needed)
5)Enable Right Clik
6)To reorder right side
7)Items selected on the right, still appear on the left
8)Add button is sometimes available
9)Double-click on left side does an add (one line only), on right side does a remove (one line only)
10???Filter (sometimes available), generally radio button with the first (default) option being “All”. This allows for “one” click switching between (for example Bcast and cable)

Can any one help me to resolve these features.
Thanks
Suresh.S

Suresh
Top achievements
Rank 1
 asked on 10 Aug 2012
1 answer
200 views
Hi,

I am using the RadGridView throughout my application.
I have implemented the IDataError interface for all items that the RadGridViews are binding to.

I hope to set the RadGridVIews ValidatesOnDataErrors="InEditMode" so that validation issues are only apparent when the user is editing something.

However, when the user clicks the "Save" button, I retrieve a bunch of custom validation errors raised in my save logic and some of these validation errors may pertain to items being displayed in the RadGridView.

In this case, I would like to be able to show validation errors InViewMode.

How do I accomplish this?

Thanks

-Rebecca
Rebecca
Top achievements
Rank 1
 answered on 10 Aug 2012
1 answer
136 views
Hello Telerik,

I currently have SelectedItem of timeline bound to an object. I am able to populate my object right left click and then performing whatever action I need to do.

Is there a way to have the item selection occuring on Mouse hover?

What I am trying to do is right click on an item (without first left clicking to select it) to invoke an instruction on the "selecteditem".

I can see that there is logic occuring when hoving over an item because the tooltip occurs as well as the selection highlight border.


Tsvetie
Telerik team
 answered on 10 Aug 2012
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?