Telerik Forums
UI for WPF Forum
6 answers
520 views
Hi all,

in my current project i have some loosely coupled modules. Let´s say in module A we have a RadGridView with a region to extend the context menu.

        <telerik:RadGridView x:Name="radGridView" IsReadOnly="True" AutoGenerateColumns="False" ShowGroupPanel="false" RowIndicatorVisibility="Collapsed" ItemsSource="{Binding States}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
             
            <!-- CONTEXTMENU -->
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="MachineStateContextMenu"  cal:RegionManager.RegionName="MachineStateContextMenu" Opened="RadContextMenu_Opened">
                    <telerik:RadMenuItem Header="Export" Click="RadMenuItem_Click">
                        <telerik:RadMenuItem.Icon>
                            <Image Source="/Joma.Workbench.Core;component/Images/page_excel.png" />
                        </telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IsSeparator="True"/>
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
</telerik:RadGridView>

A other module (let`s call it B) extends region `MachineStateContextMenu` with one or more Items bound with commands.

<StackPanel>
    <telerik:RadMenuItem Header="Machinehistory" Command="{Binding MachineHistoryCommand}" />
</StackPanel>


How can i get the current slected row when `MachineHistoryCommand` is executed? My only idea at the moment is to fire an event via the eventaggregator to inform other modules about a changed selected row.

Are there any approaches that are more reasonable?

Greetings

Ralf
Maya
Telerik team
 answered on 18 Feb 2011
3 answers
166 views
WPF does it support Reflection... silver light does it. I tried to find in wpf control but i couldn't ... Is there one?
Petar Mladenov
Telerik team
 answered on 18 Feb 2011
7 answers
493 views
Hi
I am binding 800000 records to the radgridvew control and one way of doing is as follows as normally.

List<Company> companyList = new List<Company>();
for (int i = 0; i < 800000; i++)
{
    companyList.Add(
        new Company()
        {
            Id = i,
            Name = "test name " + i,
            Address = "test address " + i,
            Revenue = 88888888,
            BusinessAres = "test area " + i,
        });
}
radGridView1.ItemsSource = companyList;

So with Q3 I try to optimize the performance like below.

List<Company> companyList = new List<Company>();
for (int i = 0; i < 800000; i++)
{
    companyList.Add(
        new Company()
        {
            Id = i,
            Name = "test name " + i,
            Address = "test address " + i,
            Revenue = 88888888,
            BusinessAres = "test area " + i,
        });
}
 
var viewList = new VirtualQueryableCollectionView(companyList) { LoadSize = 10 };           
radGridView1.DataContext= viewList;

my xaml code is like this

<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Loaded="Window_Loaded">
    <Grid>
        <telerik:RadGridView HorizontalAlignment="Stretch"
                             Margin="0,43,0,0"
                             Name="radGridView1"
                             ItemsSource="{Binding}"
                              
                             VerticalAlignment="Stretch" />
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="23,12,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
    </Grid>
</Window>

this increases the rendering speed little but I am still looking something better. So if anyone can suggest a way please reply. Thanks in advance.

Nishan
 
Sam Ur
Top achievements
Rank 2
 answered on 18 Feb 2011
3 answers
154 views
Hi,

   I am using Redgridview control in my project ,i tried your example http://www.telerik.com/help/wpf/gridview-how-to-create-external-filtering.html ,i done everything but its giveing an error at class "CustomFilterDescriptor"
protected override Expression CreateFilterExpression( ParameterExpression parameterExpression )
   {
       
if ( string.IsNullOrEmpty( this.FilterValue ) )
       {
           
return Expression.Constant( true );
       }
       
return this.compositeFilter.CreateFilterExpression( parameterExpression );<----------here
   }

i am getting error message like this "Source type must be an enumerable type." at Return value

my reqirement when i enter data in textbox,its filter rows in gridview

i need urgent this


please help me out


thanks,
satish

satish
Top achievements
Rank 1
 answered on 18 Feb 2011
3 answers
281 views
Hi

I am using Q3 2010, Blend 4, VS 2010. i am generating Columns dynamically using GridviewCheckboxColumn  my questions are

1. i am using style to align the checkbox at the center of the Column., its working perfectly fine, but the problem is when i am trying 
    to edit the checkbox moves to the left of the bound column.

2. I need to use two clicks to edit the checkbox, but i am setting the checbox

        EditTriggers = 

 

GridViewEditTriggers.CellClick;

 

         AutoSelectOnEdit = true;
   i need to do two clicks ,

3. I need to set the width and height of the gridviewcheckbox column when i set width =50, height =50, in
   edit mode it is going back to the defulat width and height

please check the attached file

 

 

<Style TargetType="telerik:GridViewCheckBox">
           <Setter Property="HorizontalAlignment" Value="Center"/>
       </Style>
thanks
sarag

 

Vanya Pavlova
Telerik team
 answered on 18 Feb 2011
1 answer
160 views
Does Telerik team has any plans on adding cosmopolitan theme to their portfolio?

If so, when can we expect that to happen?

Thank you,
Vadim K.
Hristo
Telerik team
 answered on 18 Feb 2011
5 answers
299 views
Hi

When the Menus open, they expand vertically from the top. Can I easily change this so that they just appear instantly? Or perhaps make the fade in?

Thanks
Tom Davies
Peavey Digital Research
Kaloyan
Telerik team
 answered on 18 Feb 2011
1 answer
51 views
Hello, we are planning to upgrade our version of "RadControls for WPF".

We are currently in this version: Jun 03, 2010 Q1 2010 SP2 (version 2010.1.0603)
And we want to upgrade to the latest one: Jan 14, 2011 Q3 2010 SP1 (version 2010.3.1314)

We found a page in your website, "RadControls for WPF - Changes and Backward Compatibility" at http://www.telerik.com/help/wpf/changes-backward-compatibility.html
This page has only the changes and compatibility till the Q1 2010 version, which is the one we have.

We would like to know if you can provide us the links where we can find the changes and compatibility from Q1 2010 SP2 to Q3 2010 SP1.

Thanks.
Hristo
Telerik team
 answered on 18 Feb 2011
16 answers
1.2K+ views
Hello,

Is there a way to get the GridViewRow for a record in a RadGridView?

The reason I ask is that I'm trying to implement some behavior where pressing Tab in the last cell of the Grid creates a new row and then puts the first cell for the newly added record in edit mode.  I have read this post and this post and have everything working except getting a cell in the new row in edit mode.

Thanks,

Joel
Milan
Telerik team
 answered on 18 Feb 2011
1 answer
243 views
We have this strange issue where we have a RadComboBox that we interact with from the code behind.

Basically in certain situations, we want to change the SelectedItem or SelectedValue without firing off our SelectionChanged Event Handler. So we are first Unsubscribing our event handler from the RadComboBox like this:

radComboBox.SelectionChanged -= new SelectionChangedEventHandler(ourEventHandler);

We then set our SelectedItem property to the value we want like so:

radComboBox.SelectedItem = outItem;

And then we resubscribe to the SelectionChanged event like so:

radComboBox.SelectedItem += new SelectionChangedEventHandler(ourEventHandler);

The idea is that while we set our SelectedItem, there should be no event set and nothing should fire. However, this is not the case. Instead as soon as we resubscribe to the event, the event fires all the same. Is this a bug?
Ristogod
Top achievements
Rank 2
 answered on 17 Feb 2011
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
DataPager
PersistenceFramework
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
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?