Telerik Forums
UI for WPF Forum
2 answers
226 views
In the standard MenuItem control there is an option for InputGestureText. However, RadMenuItem doesn't have this. So what do you do instead?
Mark
Top achievements
Rank 1
 answered on 21 Feb 2011
1 answer
127 views
Hello Telerik Team,
                               Yes.this is big paragraph but question is simple.I have some doupts in Gridview.In my last project master page contains 4 Business objets.
All are declared as Boolean only.So i am using Rad combo box.The field Names are NeedLoanPrint(Values are Yes\No),NeedDeliveryPrint(Yes\No),Close BS(Yes\No),PrintedType(Dos\Windows).

In my database also these are declared as BIT only.So these details are stored in database as true or false.But i want to display in radgridview the original format only.That means NeedLoanPrint,NeedDeliveryPrint,Close BS column values Yes or No only.
Same time Printed type column values Dos or Windows only.

I know its not possible directly.so i am using Converter.Here i created two converters.one is BooleanToYesNoConverter,another one BooleanToDosWindowsConverter.i have attached all in below.
This is my BooleanToYesNoConverter: 
  
class BooleanToYesNoConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object  parameter,   System.Globalization.CultureInfo culture)
        {
            string returnValue = string.Empty;
            if ((bool)value == true)
            {
                returnValue = "Yes";
                return (string)returnValue;
            }
            else
            {
                returnValue = "No";
                return (string)returnValue;
            }
        }
     public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
}
This is my BooleanToDosWindowsconverter:
  
class BooleanToDosWindowsConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string returnName = string.Empty;
            if ((bool)value == true)
            {
                returnName = "Windows";
                return (string)returnName;
            }
            else
            {
                returnName = "Dos";
                return (string)returnName;
            }
        }
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
}
After Converted  radgridview display nothing in that columns.so i am creating label inside DataTemplate:
<Meenakshi:GridViewDataColumn Header="Need Loan Print" Width="120">
   <Meenakshi:GridViewDataColumn.CellTemplate>
     <DataTemplate>
       <Label Content="{Binding NeedLoanPrint,Converter={StaticResource booleanToYesNoConverter}}"/>
     </DataTemplate>
   </Meenakshi:GridViewDataColumn.CellTemplate>
</Meenakshi:GridViewDataColumn>
if i create above method to all column its display fine.No mistakes.

In my project in future may come more field as Boolean Type.Whenever i won't create DataTemplate in XAML.So i am creating one class called as GridViewLabelColumn.After that i will use easily.
class GridViewLabelColumn : GridViewBoundColumnBase
    {
                public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
        {
            Label button = cell.Content as Label;
            if (button == null)
            {
                button = new Label();
                var valueBinding = new Binding(this.DataMemberBinding.Path.Path)
                {
                    Mode = BindingMode.OneTime,
                    Converter = this.DataMemberBinding.Converter
                };
                button.SetBinding(Button.ContentProperty, valueBinding);
            }
            return button;
        }
}
My XAML will:
<UserControl.Resources>
   <CustomControl:BooleanToYesNoConverter x:Key="booleanToYesNoConverter"/>
   <CustomControl:BooleanToDosWindowsConverter x:Key="booleanToDosWindowsconverter"/>
</UserControl.Resources>
  
<Meenakshi:RadGridView IsReadOnly="True" AutoGenerateColumns="False" Margin="12,411,12,12" Name="rgrdCompanyViewAll" MouseDoubleClick="rgrdCompanyViewAll_MouseDoubleClick">
            <Meenakshi:RadGridView.Columns>
<CustomControl:GridViewLabelColumn DataMemberBinding="{Binding Path=NeedLoanPrint,ElementName=NeedLoanPrint,Converter={StaticResource booleanToYesNoConverter }}" Header="Need Loan Print" Width="120"/>
                <CustomControl:GridViewLabelColumn DataMemberBinding="{Binding Path=NeedDeliveryPrint,ElementName=NeedDeliveryPrint,Converter={StaticResource booleanToYesNoConverter}}" Header="Need Delivery print" Width="120"/>
<CustomControl:GridViewLabelColumn  DataMemberBinding="{Binding Path=CloseBS,ElementName=CloseBS,Converter={StaticResource booleanToYesNoConverter}}" Header="Close BS" Width="120"/>
                <CustomControl:GridViewLabelColumn DataMemberBinding="{Binding Path=PrintedType,ElementName=PrintedType,Converter={StaticResource booleanToDosWindowsconverter}}" Header="Printed Type" Width="120"/>
        </Meenakshi:RadGridView.Col
</Meenakshi:RadGridView>
here is MY QUESTION:
         Everything is display fine.But the values are Changing everyseconds in radGridView.Example Printedtype Column Values originally Dos or Windows only.But it display one row Dos next row No(Its come from another column value).after few seconds Dos will change Yes or No respective their Boolean Value.

NeedloanPrint column values also comes Dos and Windows.Everysecond it change.

where i make mistake here?
               pls give me some suggestion.
Pavel Pavlov
Telerik team
 answered on 21 Feb 2011
4 answers
132 views
Hello,

I have two list boxes that I'm trying to drag content between each other. The dragging works but if I move the mouse too much it causes the carousel to scroll. How do I prevent this? Also, the drag cue items aren't under the mouse they are down and to the right. I took the drag and drop code from the sample code <ApplicationInfo> and in that sample the cue looks fine.

Any ideas?

Cheers,

Brian
Brian Crosby
Top achievements
Rank 1
 answered on 21 Feb 2011
2 answers
204 views
Hi,

I have a GridView with RowDetailsVisibilityMode set to "VisibleWhenSelected" and a RowDetailsTemplate in which I put a DataTemplate with a Grid panel. In this Grid I have several Buttons for row actions.

Whenever I select a line in code and then use ScrollIntoView for the selected Item (which is mostly not in view and at the bottom of the list), the row is indeed scrolled into view. But not the complete row details (which are expanded due to RowDetailsVisibilityMode ); only the "upper" part (the selected line) is visible and not my buttons. They are still down below.

I expect ScrollIntoView brings the complete line including row details into view.

Tested with RadControls 2010.3.1110.40

Greetings,
Daniel
Sergej Mertens
Top achievements
Rank 1
 answered on 21 Feb 2011
1 answer
55 views
I'm using RadControls_for_WPF35_2010_3_1314_Dev in VS.NET 2010.

When I drop a SplitContainer in brand new empty Window, I get one of two errors (it seems to randomly do one or the other):

Exception of type 'MS.Internal.Validate+ValidationFailure' was thrown

or

Value cannot be null
Parameter name: viewItem is null

The latter error shows twice in the same message box. Once like that and a second time in quotes.

Any ideas?

George
Telerik team
 answered on 21 Feb 2011
18 answers
360 views
Dear Telerik Users

Improving our Plugin we "trying" to make use of the wpf Treegridview Object.
Problem is, that VS 2008 during  InitializeComponent();   always comes up with the following "XamlParse Exception"
****
'/Telerik.Windows.Controls.GridView;component/themes/office/black/GridViewToggleButton.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Object reference not set to an instance of an object.  Error at object 'System.Windows.ResourceDictionary' in markup file 'Telerik.Windows.Controls.GridView;component/Themes/GenericOfficeBlack.xaml'.
****
The Gridview (Treegridview) is placed inside a normal grid in xaml:

<telerik:RadTreeListView Margin="20,12,12,46" Name="radTreeListView1" telerikControls:Theming.Theme="Windows7" />
The containing WPF - Window is launched like this:

 

 

Window1 gridViewWPFWindow = new Window1();
var WPF = new System.Windows.Interop.WindowInteropHelper(gridViewWPFWindow);
WPF.Owner = Application.DocumentManager.MdiActiveDocument.Window.Handle;
gridViewWPFWindow.Show();

It's a pity as the WPF RadTreegridview would be the perfect fit for an application we've been developing until recently in Windows Forms.
Thank you for your help.

Markus



Iftakhar
Top achievements
Rank 1
 answered on 20 Feb 2011
0 answers
187 views
Hello,
Does someone can help with reading and writing filestream file from the database. How to do it with the Telerik controls? Which control to use?
Huremagic
Top achievements
Rank 1
 asked on 18 Feb 2011
6 answers
824 views
Hi ,

I am using Telerik, Q3 2010, blend 4 vs 2010.
i am using RadGridview, i have 10 columns, in the header i have toggle button for all 10 columns, how can i know which column is checked and on checked i want to select all the cell checkbox in that particular coloumn
please check the attached image.

thanks
sarag
sarag
Top achievements
Rank 1
 answered on 18 Feb 2011
2 answers
204 views
Hi,

I have a RadGridView and need to provide a keyboard short cut to allow the user to change the sort order using the keyboard.

How would you suggest, for example, the best method to set a keyboard shortcut of alt+N to change the sort for the Name column, i.e. mimic clicking on the column header.

Here is a small sample:

<telerik:RadGridView x:Name="mygridView" 
                     ItemsSource="{Binding MyItemsView}"
                     SelectedItem="{Binding MySelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                     IsSynchronizedWithCurrentItem="True"
                     SelectionMode="Single"
                     SelectionUnit="FullRow"
                     AutoGenerateColumns="False" 
                     IsReadOnly="True"
                     IsFilteringAllowed="False"
                     ShowGroupFooters="False"
                     ShowGroupPanel="False"
                     EnableRowVirtualization="True">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="Number" DataMemberBinding="{Binding Number}" IsSortable="True" Width="Auto" IsGroupable="False" />
        <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" IsSortable="True" Width="*"  IsGroupable="False" />
    </telerik:RadGridView.Columns>
    <telerik:RadGridView.SortDescriptors>
        <telerik:SortDescriptor Member="Name" SortDirection="Ascending" />
    </telerik:RadGridView.SortDescriptors>
</telerik:RadGridView>

 

 

 

Thanks,

Andy

Ivan Ivanov
Telerik team
 answered on 18 Feb 2011
4 answers
124 views
How can i select the row just inserted if the gridview has a pager?

How to know which page the inserted row will be placed?

Thanks

Gilberto

Milan
Telerik team
 answered on 18 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?