Telerik Forums
UI for WPF Forum
6 answers
274 views
Hello Telerik,

I need to change column type of cell from GridViewDynamicHyperlinkColumn to GridViewDataColumn from code behind or data trigger which depend on DataMemberBinding="{Binding status}"  that return "Yes" or "No"

eg. 
GridView1.ItemSource 
fileName = "xxx" , status = "Yes" 
fileName = "aaa" , status = "No"
expected result
      Column 0          Column 1
Row 0 :       xxx        :        Yes        
Row 1 :       aaa         :        No           

[row0,col1 (Yes)] should be DynamicHyperlinkColumn to open a file like XAML below
[row1,col1 (No)] should be DataColumn

XAML
<telerik:RadGridView x:Name="GridView1" AutoGenerateColumns="False">
    <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding fileName}" Header="Filename" />
    <telerik:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding status}"
     Header="Upload Status"      NavigateUrlMemberPaths="status"
     NavigateUrlFormatString="{} file:///C:/{0}.xls" TargetName="_blank" />
   </telerik:RadGridView.Columns>
</telerik:RadGridView>

Please give me some advice.

Regards,

SweNz

Dimitrina
Telerik team
 answered on 16 May 2013
0 answers
335 views

Hello Team,

I have a RadGridView with checkbox column  and also have another checkbox on header for selecting all checkbox. One user select header checkbox all the checkboxes in the rows should be selected. Here is my code

for (int j = 0; j <= ChecklistOfEditLoadItems.Count; j++)
                        {
                            GridViewRow row =
                                this.editload.ItemContainerGenerator.ContainerFromItem(ChecklistOfEditLoadItems[j]) as GridViewRow;
                            if (row != null)
                            {
                                TruckInventorySolution s = row.Item as TruckInventorySolution;
                                CheckBox ab = row.FindChildByType<CheckBox>();
                                if (row.IsEnabled == false || s.IsCommitted == true)
                                {
                                    ab.IsChecked = false;
                                }
                                else
                                {
                                    ab.IsChecked = true;
                                }
                            }
                        }

but this process is very very slow.. Please help to solve this problem.


Thanks,
Sravanthi
Sravanthi
Top achievements
Rank 1
 asked on 16 May 2013
3 answers
153 views
Do you know of  a way to disable a gallery and/or single nodes (GraphNode / NodeViewModelBase) - so it will be "grayed" and can't be dragged.

I wan't to disable some objects in that palette when certain condition apply to the diagram (max nodes count)

Thanks,
Guy
Petar Mladenov
Telerik team
 answered on 16 May 2013
7 answers
599 views

Hi,

we use Telerik V2012.1.326.35 with VS2008 and we have a strange problem :(

Actually in our solution, in one of our project we added a RadPdfViewer in a XAML file. In code behind, on a RadButton click event, we call the following method :

private void loadDoc()
{
    PdfDocumentSource newDoc = new PdfDocumentSource(new Uri(@"c:\MyDir\pdf2.pdf"));
    PdfDoc.DocumentSource = newDoc;

}

I don't know why but I always received the follwing error message (see attached file).

If I move our method in a brand new solution and project, it work!!! I checked all Telerik files and they are the same in both projects.

Any thought???
Thank's

Matthew
Top achievements
Rank 1
 answered on 16 May 2013
2 answers
208 views
I am using RadDiagram for my collection of shapes, but need to know how to customize it:
  • Allow selection/resizing (and show the selection & resize handles), but don't display any connectors or allow user to connect one shape to another
  • Change the units displayed during resizing to be something other than pixels (I want inches)
  • Show bounding box around shape when I select it. I have a simple line shape and it is very hard to get the resize controls to show up. I wished it just showed a bounding box selection when I selected it.

I am willing to do these things in XAML, code-behind or combination of both.

Thanks,
 Alan
Alan
Top achievements
Rank 1
 answered on 15 May 2013
2 answers
376 views
While the RadNumericUpDown control still has the focus from a previous edit,
if I update what it is bound to in code behind and RaisePropertyChanged for the property,
the RadNumericUpDown does not get updated.

If I first take the focus off of RadNumericUpDown on to another control before changing the bound value in the same way
as above the same RadNumericUpDown does get updated.

Some questions:
  * Is this behavour expected?
  * How can I disable/workaround this?

Below is how I am defining the control and binding in XAML:
<controls:RadNumericUpDown x:Name="XTextBox" Value="{Binding GraphicalItem.Rect.X}" UpdateValueEvent="PropertyChanged" Minimum="{Binding GraphicalItem.Rect.MinX}" Maximum="{Binding GraphicalItem.Rect.MaxX}" LargeChange="{Binding LargeCoordinateChange}" SmallChange="{Binding SmallCoordinateChange}" BorderBrush="#FFCBCBCB" Margin="3,2,0,2" HorizontalAlignment="Right" BorderThickness="1" Background="{x:Null}" Height="20" MinWidth="40" Padding="1,1,2,1"/>


Alan

Alan
Top achievements
Rank 1
 answered on 15 May 2013
2 answers
68 views
I just noticed that even on a RadDiagram with no Shapes there appears to be very small black spot.
This is most visible when you set the Background of the RadDiagram to White and turn off the grid visibility.
You may need to zoom quite a way into the diagram to see this.  If you do, it appears as a Black Circle.

Here is how I am creating my empty RadDiagram in code behind:
   backgroundColor is Colors.White
   isEditingEnabled is false
private RadDiagram CreateDiagram(Color backgroundColor, bool isEditingEnabled)
{
    var diagram = new RadDiagram
    {
        IsBackgroundSurfaceVisible = false,
        Background = new SolidColorBrush(backgroundColor),
        IsPanEnabled = false,
        IsZoomEnabled = false,
        AllowCopy = false,
        AllowCut = false,
        AllowDelete = false,
        AllowDrop = false,
        ActiveTool = MouseTool.PointerTool,
        AllowPaste = false,
        IsDraggingEnabled = isEditingEnabled,
        IsResizingEnabled = isEditingEnabled,
        IsRotationEnabled = false,
        IsConnectorsManipulationEnabled = isEditingEnabled,
        IsManipulationAdornerVisible = isEditingEnabled,
        IsManipulationEnabled = isEditingEnabled,
        SelectionMode = isEditingEnabled ? SelectionMode.Single : SelectionMode.None,
        IsSnapToGridEnabled = false,
        IsSnapToItemsEnabled = false,
    };
    diagram.Clear();
    DiagramAnimations.SetIsZoomAnimationEnabled(diagram, false);
    ScrollViewer.SetHorizontalScrollBarVisibility(diagram, ScrollBarVisibility.Hidden);
    ScrollViewer.SetVerticalScrollBarVisibility(diagram, ScrollBarVisibility.Hidden);
 
    return diagram;
}


Alan
Top achievements
Rank 1
 answered on 15 May 2013
1 answer
115 views
Hello,

I would like to load data into the back stage only if the user chooses to open the back stage and so would ideally subscribe to an open event but I cannot see one. Is this true? If so, how is the best way to achieve this.

Thanks.
Kiril Vandov
Telerik team
 answered on 15 May 2013
4 answers
177 views
I have a collection of RadDiagram items I need to print out on a single page.
I also need to preview it in a View.
I have placed my RadDiagram items in cells in a Grid for each page and I want to print.
Everything works great when viewing this in a XAML view.

For printing, I take the collection of Grids (pages) and create a FixedPage for each Grid (page) and a FixedDocument to contain all
the pages.
I then use PrintDialog's PrintDocument() method.
I can't use Telerik's Printing utilities as they support only one RadDiagram and no layout.

If the size (Width & Height) of my RadDiagram is less than or equal to the size of the Grid cell,
I get an extra Scroll bar on the right and bottom sides of each RadDiagram on the page.
As I'm not embedding the RadDiagram inside of a ScrollViewer and I don't see these scroll bars when I view it on the screen,
I don't know where this is coming from.

To prove it is RadDiagram causing this, I have substituted a simple Rectangle control in place of the RadDiagram and the 
scroll bars go away.  I have also tried an empty RadDiagram and I also get the scroll bars.

I have attached a picture of one RadDiagram in a Grid being viewed and the same Grid being printed to show the scroll bars.

My questions are:
  * Why am I getting the scroll bars?
  * How do I turn them off?

Thanks,
 Alan
Hristo
Telerik team
 answered on 15 May 2013
1 answer
88 views
Hi,

In a wpf application i have seen the numericupdown control (I think so) has a + and - button on either side to change value. How to add a control like that?

Thanks,
Ivy
Shinu
Top achievements
Rank 2
 answered on 15 May 2013
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?