Telerik Forums
UI for WPF Forum
3 answers
478 views
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
         
    { 
        if (e.Item is GridHeaderItem) 
        { 
            GridHeaderItem header = (GridHeaderItem)e.Item; 
            // to set the height of the Grid Header 
            header.Height = Unit.Pixel(20); 
 
            // to add an Image in the Grid Header 
            Image img=new Image(); 
            img.ID = "Image1"
            img.ImageUrl = "~/Image1.gif"
            header["columnUniqueName"].Controls.Add(img); 
 
        } 
    } 


Can anyone please let me know how to do above thing in WPF RADGRIDVIEW because radgridview dont have any event like ItemDataBound. I m also using Telerik.windows.control namaspace not Telerik.Web.UI. 



Below is my Code

// I m adding Columns dynamically,

GridViewDataColumn IsUnRead = new GridViewDataColumn();
IsUnRead.Header = "R";
IsUnRead.UniqueName = "IsUnRead";
IsUnRead.Width = new GridLength(40);
this.gvEmail.Columns.Add(IsUnRead);



I want to have Image in header also dynamically by code.


Thanks in advance. Your view will be highly appreciated.

MIRAL SHAH 
Milan
Telerik team
 answered on 07 Oct 2009
1 answer
164 views

I have seen several threads about this topic and all of them end with a reference to

http://blogs.telerik.com/vladimirenchev/posts/09-04-03/how_to_save_and_load_settings_with_radgridview_for_wpf.aspx

Unfortunately it is out of date, because it doesn’t work with the last Telerik release libraries version 2009.2.813.35. I have tried to fix but I can’t makes it works and serialize to save it. I feel like inventing the wheel!

 

Could someone from Telerik update it?

Vlad
Telerik team
 answered on 07 Oct 2009
1 answer
125 views
Hi,

I got this un-handled exception in tree control, even though I had try catch block in the code"
any idea on this what would be the reason?
One more thing its referring to a path which does not exists on my machine?
c:\Builds\WPF_Scrum\Navigation_WPF_2009_Q1_SP2\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.Events.cs

Exception: Object reference not set to an instance of an object.
Stack Trace:    at Telerik.Windows.Controls.RadTreeViewItem.HandleSingleClickFunctionality() in c:\Builds\WPF_Scrum\Navigation_WPF_2009_Q1_SP2\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.Events.cs:line 816
   at Telerik.Windows.Controls.RadTreeViewItem.OnHeaderMouseLeftButtonUp(Object sender, MouseEventArgs e) in c:\Builds\WPF_Scrum\Navigation_WPF_2009_Q1_SP2\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.Events.cs:line 811
   at System.Windows.Input.MouseButtonEventArgs.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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.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 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, Int32 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, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
Exception Source: Telerik.Windows.Controls.Navigation

Thanks,
Bala

Bobi
Telerik team
 answered on 07 Oct 2009
1 answer
174 views
Hi,

I'm using WPF controls version 2009.2.904.35.
I need to make the RadGridView to validate cell value, make the background red and show a tooltip when the cell value is not correct. I tried using CellValidating event, modifying e.Cell.Background and setting tooltip using .NET SetTooltip utility function, but it works only for FIRST time. the rest of the modifications to the cell does not trigger the grid to be refreshed.

Can you please send me a common example which validates the cells in the beginning when loading the data, and further when cell values are updated.

Thanks a lot,
Ruben.
Nedyalko Nikolov
Telerik team
 answered on 07 Oct 2009
1 answer
127 views
Hi All,

I'd appreciate if someone can explain how to add a header row to a radgridview programmatically or via the XAML.

Attached is the result that I want to get.

Thanks,

Yaron.
Vlad
Telerik team
 answered on 07 Oct 2009
1 answer
106 views
hello

I have a recurrent problem with the WPF component online demo.

When playing with, I very oftent get the famous Windows Blue screen.
I don't have the issue with the VS version of the demo

Is there any known issue?

thanks
Milan
Telerik team
 answered on 07 Oct 2009
1 answer
333 views
Hi,

I have a categorical 2D bar chart where I would like the bars to be a specific width (about 20) or at least minwidth 20 for the bars. Then I want the chart so expand it's width in case there are a lot of bars or categories. Basically take the space it needs.

Right now it seems like even if I don't set a width or only a min width the chart tries to cramp everything together instead of just expanding its width.

So the question is, how do i do that?

This is my current template:
<ControlTemplate TargetType="telerik:Bar"
   <Canvas> 
      <Rectangle x:Name="PART_DefiningGeometry" 
                 Height="{TemplateBinding ItemActualHeight}" 
                 RadiusX="2" 
                 RadiusY="2" 
                 Stroke="Transparent" 
                 StrokeThickness="1" 
                 MinWidth="20" 
                 Style="{TemplateBinding ItemStyle}" /> 
   </Canvas> 
</ControlTemplate> 

I attached a image that shows how it looks at the moment.
Vladimir Milev
Telerik team
 answered on 07 Oct 2009
1 answer
130 views
Take the FirstLook example of the TileView.

Remove the height/width attributes and set Margin to 0, effectively making the height and width dynamic.
(To test you'll also need to set the LayoutRoot's margin to 0)

Run that, and the images are suddenly out of control, and the performance seems to plummet.
Tihomir Petkov
Telerik team
 answered on 07 Oct 2009
1 answer
160 views

HI,

Just wondering if there is a way to change the weekday view by letting a week starting from Wednesday and ending on Tuesday.

Thanks,

Kevin

Valeri Hristov
Telerik team
 answered on 06 Oct 2009
2 answers
289 views
hello, i am using  gridview with mvvm pattern and binding
i use columns like this to build my grid:

<telerik:GridViewColumn IsSortable="False" HeaderText="Amount"
                        <telerik:GridViewColumn.CellStyle> 
                            <Style TargetType="telerik:GridViewCell"
                                <Setter Property="Template"
                                    <Setter.Value> 
                                        <ControlTemplate TargetType="telerik:GridViewCell"
                                            <StackPanel> 
                                                <TextBox PreviewKeyDown="TextBox_PreviewKeyDown" HorizontalAlignment="Stretch" 
                                                         Margin="3" VerticalAlignment="Center" 
                                                         Text="{Binding Path=Amount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></TextBox> 
                                            </StackPanel> 
                                        </ControlTemplate> 
                                    </Setter.Value> 
                                </Setter> 
                            </Style> 
                        </telerik:GridViewColumn.CellStyle> 
                    </telerik:GridViewColumn> 


the problem is i can´t set tab index to my controls (textboxes), i want to press tab and move to my textbox, how can i do so?
when i press tab i get focus in the cell not in my textbox

matias
Top achievements
Rank 1
 answered on 06 Oct 2009
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
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?