Telerik Forums
UI for WPF Forum
1 answer
88 views
Hello
i have some problem about gridvieuw
first :
how to make a columns to Unselectable stat?,i want to prevent the user to clicking on some columns
the second
to solve the first problem I use this method :
the main objectf is to click on specefic cells and capture the value to use in a sql query,so i need to capture the adequate value for the query works.
here is the code :
void GridViewKPI_MouseDown(object sender, MouseButtonEventArgs e)
        {
            RadContextMenu radContextMenu = new RadContextMenu();
 
            if (GridViewKPI.CurrentCell.Column.UniqueName == "Cell ID")
            {
                TBox_CellID.Text = GridViewKPI.CurrentCell.Value.ToString();
                 
                RadMenuItem copyItem = new RadMenuItem();
                copyItem.Header = "Show In chart";
                radContextMenu.Items.Add(copyItem);
                RadMenuItem pasteItem = new RadMenuItem();
                pasteItem.Header = "Show in Ho Stat";
                radContextMenu.Items.Add(pasteItem);
                RadMenuItem cutItem = new RadMenuItem();
                cutItem.Header = "Show in Map";
                radContextMenu.Items.Add(cutItem);
                RadContextMenu.SetContextMenu(this.GridViewKPI, radContextMenu);
 
            }
            //else radContextMenu.Items.Remove(copyItem);
        }
The code work fine ,the first time when i click in other cells nothing happens,and when i click in a  specefic cells (Cell ID in my case) the contextmenu appears normally and this is the main objectif,but after this when i reclick in the other cell the contextmenu appears also,and this is my problem,the contextmenu must appears only when i click in a specific columns.
so,how to prevent this to happen?
thanks a lot
Amine
Top achievements
Rank 1
 answered on 14 Oct 2012
4 answers
667 views
hi!!!

how can i looping throught the collection  of items (or throught comboboxitem ) of my combobox  in code behind??

here is my code

 

 

<telerik:RadComboBox IsEditable="True" IsTextSearchEnabled="True">

 

 

 

<telerik:RadComboBoxItem>

 

item1

 

 

</telerik:RadComboBoxItem>

 

 

 

<telerik:RadComboBoxItem>

 

item2

 

 

</telerik:RadComboBoxItem>

 

 

 

<telerik:RadComboBoxItem>

 

item3

 

 

</telerik:RadComboBoxItem>

 

 

 

 

 

 

 

</telerik:RadComboBox>

thanks for your help

Oscar Zapata

 

Boyan
Telerik team
 answered on 14 Oct 2012
2 answers
108 views
Hi!
I have made a customized appointment view selector by copying the template in Expression and specified the new to be used by the Control:

AppointmentStyleSelector="{DynamicResource ScheduleViewStyleSelector1}"

Everything works fine and all appointments are displayed using the new selector.
But now, double clicking an appointment doesn't work anymore. The Edit appointment dialog is not displayed.

Why does it behave like this?
Lennart Bauer
Top achievements
Rank 1
 answered on 13 Oct 2012
1 answer
78 views
I implemented undo in my application, but when a cell is selected, pressing control+z starts editing the cell. Does someone know what is the best way to prevent this from happening?

Also, when in cell edit mode, control+z is not passed along, but performs undo within the textbox. Does anyone know the best way to pass on the control+z keypresses?
Erik
Top achievements
Rank 1
 answered on 13 Oct 2012
0 answers
77 views
Hello Telerik
I have a WPF application with UserControls. One UserControl contains a RdGridView (DataView/DataViewModel). The application can switch between some several UserControls
like this:

xaml:

<Window.Resources>
    <DataTemplate DataType="{x:Type local.viewmodels:WellcomeViewModel}">
        <local.views:WellcomeView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type local.viewmodels:DataViewModel}">
        <local.views:CurrentDataView />
    </DataTemplate>
    â€¦
</Window.Resources>

 MainWindowViewModel C#:

CurrentPageViewModel = PageViewModels.Find(vm => vm.ToString() == "WPFPageApp.ViewModels.CurrentDataViewModel");

The RadGridView is bound to a QueryableEntityCollectionView property  (Suppliersof the DataViewModel using the EntityFramework. 
On one button in the MainWindowViewMode I set a Filter before switching to the DataView via MVVM Light messaging in the DataViewModel:

DateTime toDay = DateTime.Now.Date;
Suppliers.FilterDescriptors.Add(new FilterDescriptor("InsertDate", FilterOperator.IsGreaterThanOrEqualTo, toDay));

On another button (in the MainWindowViewMode ) I change the sort order before switching to the DataView:

Suppliers.SortDescriptors.Add(new SortDescriptor()
{
    Member = "Id",
    SortDirection = System.ComponentModel.ListSortDirection.Descending
});

With EventToCommand from MVVM Light I call a function RowLoaded in the DataViewModel to format the cells. 
So far so good.
The problem is that sometimes the RowLoaded even is not called, when I switch from one UserControl to the UserControl containing the RadGridView. It seems that something happened to the GridView when the UserControl is switching to another UserControl.

I hope I have explained it well enough to understand the architecture.

Thank you in advance Uwe
Uwe
Top achievements
Rank 1
 asked on 12 Oct 2012
14 answers
280 views
while adding camera extension in chart i get an error as "Object refrerence not set to an instance of object". ...even when i copied and paste your sample of bar chart in 3d galllery of wpf...first of all seriesextension comes undefined..and when i comment that code to run the project..i get an error in camera extension as "object reference....."..
Please help me out with this...
 Private Sub UserControl_Loaded(ByVal sender As ObjectByVal e As RoutedEventArgs)
            Dim cameraExtension As New CameraExtension()
            RadChart1.DefaultView.ChartArea.Extensions.Add(cameraExtension)  'getting error over here...
        End Sub


 Private Sub FillSampleChartData()
            Dim d As New Bar3DSeriesDefinition()
            d.ItemStyle = DirectCast(Me.FindResource("MyStyle"), Style)
            RadChart1.DefaultSeriesDefinition = d

            ' RadChart1.ItemsSource = SeriesExtensions.GetUserData(5, 0)  'commented code for debugging
        End Sub


Thanks,
kapil Garg
Petar Kirov
Telerik team
 answered on 12 Oct 2012
2 answers
134 views
Hi!

I have followed the example in the documentation for customizing the appointment style.
This works.However, with the new appointment style, I cannot longer double click on the appointment!
Nothing happens. If I remove the style, the editor appears when I double click on an appointment.

With the style applied, I can still doubleclick on an empty slot. The Editor appears as excpeted.

How do I solve this?

I'm using VS2010 and Expression blend 4.

Regards,
Lennart
Kshamesh
Top achievements
Rank 1
 answered on 12 Oct 2012
3 answers
573 views
Hi,

we use VS2008 and Telerik V2012.02.912.35 and I would like to know if it's possible to remove all animation in one shot!!! Actually we have an application with multiple DLL which contain RadWindow and others Telerik controls...

As an example, in my solution, I have a docking project and by removing the animation of the main window of my project reduce the display time by more than 50%.

Thank's
Boyan
Telerik team
 answered on 12 Oct 2012
3 answers
141 views
Normally if user select text in web page and paste to MS Word or Excel file the pasted text should retains the same format as source text. The font color, size and font family info should be copied either. As required I have applied font family Courier New onto the RadGridView. However if I select cell in grid and paste to MS word the font family was gone and the pasted text is in New Times Roman and size of 12. How can I retain the format when the grid is in selection mode of extend and selection unit of cell ?
Vlad
Telerik team
 answered on 12 Oct 2012
4 answers
136 views
Hi,

I am using RadGridView to select itemsfrom a database to be archived to an external drive, applying complex filters in code-behind, I then need to iterate RadGridView.Items, however because I am also using a RadPager control, I can only access up to a complete page full (in this case 25). How do I iterate all items that are currently available.

Best regards
Peter
Peter
Top achievements
Rank 1
 answered on 12 Oct 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?