Telerik Forums
UI for WPF Forum
1 answer
189 views
hi..
Please tell me how to binding ImageSource as DataMemberBinding of GridViewImageColumn. 

i am try this.But it`s not working.

public ImageSource  myimage { get;set;}

<telerik:GridViewImageColumn x:Name="InsatllmentCustomerViewImage" UniqueName="Image" Header="Pictute" TextAlignment="Center" Width="100" HeaderTextAlignment="Center" ImageHeight="40" ImageWidth="40"  DataMemberBinding="{Binding myimage 
, ElementName=window}"/>

Please provide a perfect example.

thank `s  for help
Md.Hasanuzzaman
Top achievements
Rank 1
 answered on 21 Sep 2011
1 answer
164 views
Hello

Does any body know how to add shortcut to RadMenuItem, for example  <New          "Ctrl+Shift+N">? As i see there no out of the box solution?

Thanks in advance.
Konstantina
Telerik team
 answered on 21 Sep 2011
10 answers
231 views

Hi, I have the following style set in my global resource dictionary but it is not being applied to the ScheduleView control since I upgraded to the 2010.3.1314.35 binaries. Used to work fine with version 2010.3.1110. Could someone please explain what the cause of this problem might be? I'm using the StringFormat on the binding to output just the day portion of the date but actually the whole date ('17-02-2011') is being output.

<Style x:Key="TimeRulerGroupItemBaseStyle" TargetType="scheduleView:TimeRulerItemBase">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Background" Value="{StaticResource GroupHeaderHeaderBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderHeaderOuterBorder}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Padding="0 3" Text="{Binding DateTime, StringFormat='dd'}" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="scheduleView:TimeRulerItemBase">
                    <Grid>
                        <Border x:Name="HeaderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Border BorderBrush="{StaticResource GroupHeaderHeaderInnerBorder}" BorderThickness="1" />
                        </Border>
                        <ContentPresenter Margin="0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

<Style TargetType="scheduleView:TimeRulerGroupItem" BasedOn="{StaticResource TimeRulerGroupItemBaseStyle}" />

Thanks,
Peter.
Pana
Telerik team
 answered on 21 Sep 2011
1 answer
154 views
When I group on a column and then sort to another column, I get this message..
But if I do the other way (sort and then group) no message ????

Any clues  ?????

Unable to cast object of type 'Maximum.Edm.Scale.Ticket' to type 'Telerik.Windows.Data.IGroup'.   at

Telerik.Windows.Data.FuncExtensions.<>c__DisplayClass1`2.<ToUntypedFunc>b__0(Object item)
   at Telerik.Windows.Data.KeyedCollection.GetKeyByItem(Object value)
   at Telerik.Windows.Data.KeyedCollection.IndexOf(Object value)
   at Telerik.Windows.Data.QueryableCollectionView.InternalIndexOf(Object item)
   at Telerik.Windows.Data.QueryableCollectionView.IndexOf(Object item)
   at Telerik.Windows.Data.DataItemCollection.IndexOf(Object value)
   at Telerik.Windows.Controls.GridView.Selection.CellRegionsPartitioner.GetFirstAndLastIndices(IList`1 items)
   at Telerik.Windows.Controls.GridView.Selection.CellRegionsPartitioner.CalculateAffectedRegions()
   at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.UpdateSelectedCells(IList`1 items, Boolean isSelected)
   at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.Items_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
   at Telerik.Windows.Data.QueryableCollectionView.OnSortDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
   at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter)
   at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformSorting(GridViewSortingEventArgs sortingArgs)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass74.<Sort>b__73()
   at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.Sort(GridViewColumn column, Boolean appendToExisting)
   at Telerik.Windows.Controls.GridView.GridViewHeaderCell.RequestSort(Boolean appendToExisting)
   at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   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.RaiseTrustedEvent(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, WindowMessage 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, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Nedyalko Nikolov
Telerik team
 answered on 21 Sep 2011
1 answer
145 views
hi,
I am using the following code in aspx.cs and aspx page to turn off/on the filetring of radgrid, but its working the vice-versa. When I click on FilterOn button, filters hide and when I click on FilterOff button, filters show up.
protected void btnFilterOn_Click(object sender, EventArgs e)
  {
          rdgResult.MasterTableView.TableLayout = GridTableLayout.Auto;
          rdgResult.AllowFilteringByColumn = true;
          rdgResult.MasterTableView.AllowFilteringByColumn = true;
          hdnFilterState.Value = "ON";
          this.BindGrid();
          ibtnFilterOff.Visible = true;
          ibtnFilterOn.Visible = false;
          btnFilterOnBtm.Visible = false;
          btnFilterOffBtm.Visible = true;
        
  }
  protected void btnFilterOff_Click(object sender, EventArgs e)
  {
         rdgResult.MasterTableView.TableLayout = GridTableLayout.Auto;
          rdgResult.AllowFilteringByColumn = false;
          rdgResult.MasterTableView.AllowFilteringByColumn = false;
          hdnFilterState.Value = "OFF";
          this.BindGrid();
          ibtnFilterOff.Visible = false;
          ibtnFilterOn.Visible = true;
          btnFilterOnBtm.Visible = true;
          btnFilterOffBtm.Visible = false;
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel">
                                    <AjaxSettings>
                                        <telerik:AjaxSetting AjaxControlID="rdgResult">
                                            <UpdatedControls>
                                                <telerik:AjaxUpdatedControl ControlID="rdgResult" />
                                            </UpdatedControls>
                                        </telerik:AjaxSetting>
                                    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Transparency="50">
                                    <img alt="Loading..." src="Images/Loading.gif" style="border: 0px; margin-top: 60px;" />
</telerik:RadAjaxLoadingPanel>
  
<telerik:RadGrid ID="rdgResult" runat="server" Skin="Office2007" Width="957px" BackColor="White"
                                        AutoGenerateColumns="true" PageSize="10" AllowSorting="True" AllowPaging="True"
                                        filtercontrolwidth="5px" AllowFilteringByColumn="false" showfiltericon="true"
                                        filterlistoptions="VaryByDataType" showsorticon="true" EnableViewState="true"
                                        ClientSettings-Scrolling-AllowScroll="true" OnNeedDataSource="rdgResult_NeedDataSource"
                                        OnItemDataBound="rdgResult_ItemDataBound" OnColumnCreated="rdgResult_ColumnCreated"
                                        OnItemCreated="rdgResult_ItemCreated" OnDetailTableDataBind="rdgResult_DetailTableDataBind"
                                        OnExcelMLExportRowCreated="rdgResult_ExcelMLExportRowCreated" OnExcelMLExportStylesCreated="rdgResult_ExcelMLExportStylesCreated"
                                        OnPreRender="rdgResult_PreRender">
                                        <HeaderStyle Width="160px" HorizontalAlign="Center" CssClass="clsTableHeading1" />
                                        <ItemStyle Font-Size="8pt" HorizontalAlign="Left" CssClass="clsTableCellLeft" />
                                        <ExportSettings FileName="Detail Report" IgnorePaging="true" Excel-Format="ExcelML" />
                                        <ClientSettings EnableRowHoverStyle="false">
                                            <Selecting AllowRowSelect="false" EnableDragToSelectRows="false" />
                                            <Scrolling AllowScroll="false" UseStaticHeaders="true" ScrollHeight="100"/>
                                        </ClientSettings>
                                        <MasterTableView TableLayout="Auto" Name="DetailRpt" Width="100%" Height="90%" AllowMultiColumnSorting="false"
                                            DataKeyNames="Document #" HierarchyLoadMode="ServerOnDemand" HeaderStyle-Font-Bold="true"
                                            HeaderStyle-HorizontalAlign="Center" AllowFilteringByColumn="false" ItemStyle-HorizontalAlign="Left">
                                            <%-- <HeaderStyle Width="200px" />--%>
                                            <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric"></PagerStyle>
                                            <NoRecordsTemplate>
                                                <span class="clsTableCellCenter" style="padding-left: 250px;"><b>Sorry, there is no
                                                    matching data available for display.</b></span>
                                            </NoRecordsTemplate>
                                            <Columns>
                                                <telerik:GridTemplateColumn HeaderStyle-Width="30px" HeaderText="Sel" ShowFilterIcon="false"
                                                    DataField="column value" HeaderStyle-HorizontalAlign="Center" AllowFiltering="false"
                                                    ItemStyle-HorizontalAlign="Center">
                                                    <ItemTemplate>
                                                        <asp:Literal ID="RadioButtonMarkup" runat="server" EnableViewState="true"></asp:Literal>
                                                        <%-- <asp:RadioButton GroupName="radSelGrp" ID="radSel" runat="server" TextAlign="Left" CssClass="clsLabel1" />--%>
                                                        <input type="hidden" id="hdnDocNo" name="hdnDocNo" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Document #")%>' />
                                                        <input type="hidden" id="hdnRevision" name="hdnRevision" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Rev Ltr")%>' />
                                                        <input type="hidden" id="hdnFlag" name="hdnFlag" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"SHOWHYPERLINK")%>' />
                                                        <input type="hidden" id="hdnStatus" name="hdnStatus" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"STATUS")%>' />
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                            <%--  <DetailTables>
                                                <telerik:GridTableView TableLayout="Auto" Width="100%" Name="RecordDetails" AutoGenerateColumns="false"
                                                    AllowPaging="true" AllowSorting="false" ShowHeader="false" EnableViewState="true"
                                                    BorderColor="LightGray" AllowFilteringByColumn="false" BorderWidth="1">
                                                    <NoRecordsTemplate>
                                                        <center>
                                                            <span class="clsTableCellCenter"><b>Sorry, there is no matching data available for display.</b></span>
                                                        </center>
                                                    </NoRecordsTemplate>
                                                    <HeaderStyle Height="0px" />
                                                    <Columns>
                                                        <telerik:GridTemplateColumn>
                                                            <ItemTemplate>
                                                                <asp:Label ID="LblDataSubject" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DATA_SUBJECT") %>'
                                                                    CssClass="clsTableCellLeft" Width="800px" Style="padding-left: 28px; border-left: 0px;"></asp:Label>
                                                                <input type="hidden" name="hdnDatasubject" id="hdnDatasubject" runat="server" />
                                                                <asp:Button class="clsbuttonsize" ID="btnDots" runat="server" Text="..." Visible="false" />
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                    </Columns>
                                                </telerik:GridTableView>
                                            </DetailTables>--%>
                                        </MasterTableView>
                                    </telerik:RadGrid>
Thanks in advance.
Rossen Hristov
Telerik team
 answered on 21 Sep 2011
5 answers
195 views
Hey,
I've got strange issues with SelectedItem Binding of the Carousel, I believe it is due to virtualization, as when an item is visible somewhere along the rendered items, I am able to "jump" to the card of the item when I'm manipulating the SelectedItem binding.
if it's not visible than nothing is happening.

If I am correct with my assumption, how do I disable virtualization assuming this is what I need to do :)

Thanks
Ariel
Ariel Ben Horesh
Top achievements
Rank 1
 answered on 21 Sep 2011
1 answer
255 views
Hi,

I need more information after the user changed an appointment per mouse-action (ViewDefinition = Timeline).
I have three cases:
a) the user changed the start time...
b) the user changed the position of the appointment
c) the user changed the end time...

In the AppointmentEdited-event I can´t find determination to handle the three cases.
My concret problem:
When the user changed the end time (see sample from 18. Oct to 19. Oct) the AppointmentEdited-event sends:
e.Appointment.start = #10/18/2011#  (ok), and...
e.Appointment.end =   #10/20/2011#. In my scenario I´m working with "full days"  (SnapAppointments="True") and i need  #10/19/2011# as end time. Thanks in advance for your feedback.


kindly regards,
Stefan
Konstantina
Telerik team
 answered on 21 Sep 2011
1 answer
196 views
I'm trying to use the RadDocking for its tabs that can be peeled off into new windows- ideally when this is done I'll have something like Chrome or IE's tabs. I know it's not a perfect match, but I don't know of any other controls that work better for this. 

My specific problem, is that when I drag a tab out of its tab strip, it floats immediately, and I don't know how to catch an event for "dropping" it- letting go of the mouse in a non-docking region. I'm hoping that I can detect the drop, rather than the pick up, because I need to build a new window around floating tabs, but I also need to make sure not to "window in" tabs in transit to other docking areas.

For reference, my current (non-working) code is below. Its problem is that I never get a chance to move tabs to existing dockin gregions, it always makes the new window.

private void radDocking1_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)
    {
      if (e.OriginalSource.GetType() == typeof(RadPane))
      {
        RadPane Pane = (RadPane)e.OriginalSource;
        if (Pane.IsFloating)
        {
          MainWindow newWindow = new MainWindow();
          Pane.RemoveFromParent();
          newWindow.radPaneGroup1.AddItem(Pane, DockPosition.Center);
          newWindow.Show();
        }      
      }
    }

Also, if you can think of a better way to make a draggable tab interface than using RadDocking, please let me know.
Konstantina
Telerik team
 answered on 21 Sep 2011
1 answer
373 views
Hello,

how can I set the font-family for all Telerik controls in my WPF project centrally?

Is there a way to override the Segoe font with Calibri?

THanks
Vanya Pavlova
Telerik team
 answered on 21 Sep 2011
1 answer
156 views
The sample code shown for the tileview does not make sense or work as this refers to RadTreeviewItems and a metadataoptions object that does not exist. http://demos.telerik.com/silverlight/#PersistenceFramework/TileViewConfigurator

This needs to be updated.

Greg
Alex Fidanov
Telerik team
 answered on 21 Sep 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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?