Telerik Forums
UI for WPF Forum
3 answers
159 views
hello,

I use a colorselector in a raddropdownbutton (on a ribbon), to select color for several objects.
i have a framework as described bellow.

I'd like that each time i click on "color" button, the selectedcolor is empty.
because i need to be able to apply the same color for different objects, and sometimes user doesn't select all at one time, but select one defines a color, the selects another object and want to define same color. then he needs to change color selection, then reopen colorselector to choose right color.

<Window x:Class="tlk_colorpicker.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <tlk:RadDropDownButton Content="Color"  x:Name="color">
            <tlk:RadDropDownButton.DropDownContent>
                <tlk:RadColorSelector  SelectedColorChanged="PredefSelectedColorChanged"    NoColorVisibility="Collapsed" />
            </tlk:RadDropDownButton.DropDownContent>
        </tlk:RadDropDownButton>
         
        <Rectangle x:Name="oRect" Width="50" Height="50" Grid.Row="2"  Fill="AliceBlue" />
    </Grid>
</Window>
private void PredefSelectedColorChanged(object sender, EventArgs e)
        {
            oRect.Fill = new SolidColorBrush(((RadColorSelector)sender).SelectedColor);
            color.IsOpen = false;
        }

thanks for your expertise
Aurore
Petar Mladenov
Telerik team
 answered on 08 Dec 2011
2 answers
208 views
Is there a way to customize the ToolTip placement for an item tooltip within the WPF RadChart?  It looks like it always uses MousePoint but I would like to have the tooltips shown above their source DataPoint.  Ideally I would like to specify a CustomPopupPlacementCallback similar to WPF ToolTips.

The WPF equivalent property is ToolTipService.Placement.  I did not see any similar properties on the ItemToolTip2D class.  I found a ChartTooltipBehavior class in the WPF documentation which was promising but it only appears to apply to Windows Phone.

Thanks for any help or suggestions that can be offered.
Steve
Top achievements
Rank 1
 answered on 08 Dec 2011
1 answer
232 views
Hello Telerik,
I'm following the demo titled "GridView Printing Paged Data" and I got some problem selecting a print range... since my view can have a lot of items I wish to let the user select a range...

Here's my PrintPreview method

public static void PrintPreview(GridViewDataControl source)
       {
           Window window = new Window();
           window.Title = "Print Preview";
 
           DocumentViewer documentViewer = new DocumentViewer();
           PrintDialog printDialog = new PrintDialog();
 
           printDialog.PageRangeSelection = PageRangeSelection.UserPages;
           printDialog.UserPageRangeEnabled = true;
 
           printDialog.MaxPage = 40;
           documentViewer.Document = ToFixedDocument(ToPrintFriendlyGrid(source), printDialog);
            
           window.Content = documentViewer;
 
           window.ShowDialog();
       }

It shows me only Print alla pages...what am I doing wrong?
Thanks
Paolo

Dimitrina
Telerik team
 answered on 08 Dec 2011
3 answers
79 views
Hi Folks,
I've got a RadGridView with a details view that itself contains three RadGridViews.
The problem is, events from the inner Grid e.g. SelectionChanged or MouseDoubleClick  are transported somehow to the outer Grid.
This leads to serious problems, for example the outer grid collapses the details when the user double clicks in the inner gridview..
How can I prevent the outer grid accepting events from controls of the details page ? 
(Is this a common event routing issue ?)

Best regards
Oliver

(P.S. or, vica versa, how to prevent the "inner" controls sending events to the outside? There's this structure: The outer grid contains a RadTabControl, some tabs, each tab contains a Grid which contains three RadGridViews and some buttons)

Vlad
Telerik team
 answered on 08 Dec 2011
0 answers
105 views

Hi,


We are using Telerik WPF controls (ver. 2011.2.920.35) and we are trying to accomplish tooltips in the case of a validation failure in one of the grid cells.

Attached is a screenshot that highlights two cells - one with a combobox and the other with a text field. We want the validation errors to be presented for the cell with a combobox just like the way it gets presented for a text field column.

Please let us know how can we do that.

Any help is very much appreciated.

Regards,
Shalini
salini
Top achievements
Rank 1
 asked on 08 Dec 2011
1 answer
113 views

Hi,

I have a scenario where I need to update the layout of a RadGridView when I change the width of a column from my ViewModel.
My first approach was to use the ColumnWidthChanged event, but it does not fire.
Is this intended behavior?
I could trigger the UpdateLayout() call from my ViewModel, but it does not belong there because it is entirely UI related stuff...

Any suggestions?

Best Regards,
Christian

 

 

 

Vlad
Telerik team
 answered on 08 Dec 2011
2 answers
175 views
Hi,

As i was trying to create user control(Filtering) and want to attache with RAD GRID. Perhaps it's done but my events for Filtering is not getting fired. Can any one provide a small example for this with source code.
Krishna
Top achievements
Rank 1
 answered on 08 Dec 2011
1 answer
91 views
Hi,

I was asked to implement feature to find values in grid (user wants to see all rows so i cant use filters)
user wants (picture)
(1) field to input search text
(2) button to find all rows (kind of bookmark)
(3) button to iterate in find items (find next)

is there built in Search in grid (without filters) ?
I made this feature with this code:
private void btnFind_Click(object sender, RoutedEventArgs e)         {             btnFind.IsEnabled = false;             scrollIntoFindIndex = 0;             string searchText = txtFind.Text;             dgDynGrid.SelectedItems.Clear();             foreach (object o in dgDynGrid.Items)             {                 if (o is DataRowView)                 {                     for (int z = 0; z < (o as DataRowView).Row.ItemArray.Count(); z++)                     {                         try                         {                             string t = (o as DataRowView).Row.ItemArray[z].ToString();                             if (t.IndexOf(searchText, StringComparison.InvariantCultureIgnoreCase) >= 0)                             {                                 dgDynGrid.SelectedItems.Add(o);                                 break;                             }                         }                         catch                         {                             //if it cant be converted to string, i will not find in this field                         }                     }                 }             }             btnFind.IsEnabled = true;             ScrollIntoFind(0);         }         int scrollIntoFindIndex = 0;         private void ScrollIntoFind(int i)         {             if (dgDynGrid.SelectedItems.Count > i)             {                 dgDynGrid.ScrollIntoView(dgDynGrid.SelectedItems[i]);             }             else             {                 scrollIntoFindIndex = 0;                 MessageBox.Show("Završila je pretraga, idučim klikom se pretražuje od početka""Kraj pretrage"MessageBoxButton.OK, MessageBoxImage.Information);             }         }         private void btnFindNext_Click(object sender, RoutedEventArgs e)         {             scrollIntoFindIndex++;             ScrollIntoFind(scrollIntoFindIndex);         }

but I am sure there must be better way to do this.
I would appreciate any hint

Thank you

Nedyalko Nikolov
Telerik team
 answered on 08 Dec 2011
1 answer
172 views
I would like to disable editing action (editing appointment via double click). How to acomplish that?

I tried with:       
private void RadScheduler_AppointmentEditing(object sender, AppointmentEditingEventArgs e)
        {
            e.Cancel = true;
        }

but it doesnt work.
Boyan
Telerik team
 answered on 08 Dec 2011
1 answer
161 views
  Hi,

I need to maintain scroll position (both horizontal and vertical) when moving across pages.
I tried the following code , but was unable to achieve the desired functionality.
Even after calling RestoreScrollPosition() the scrollviewer didn't change its position.




private void btnNext_Click(object sender, RoutedEventArgs e)



{

SetScrollPosition();
BindData();

RestoreScrollPosition();







}







private void SetScrollPosition()



{



GridViewScrollViewer svSummaryInfo = (GridViewScrollViewer)rtSummaryInfo.FindChildByType<GridViewScrollViewer>();








_dbVerticalOffset = svSummaryInfo.VerticalOffset;
_dbHorizontalOffset = svSummaryInfo.HorizontalOffset;
}




private



void RestoreScrollPosition()



{


GridViewScrollViewer



svSummaryInfo = (GridViewScrollViewer)rtSummaryInfo.FindChildByType<GridViewScrollViewer>();





if (svSummaryInfo != null)



{



svSummaryInfo.ScrollToHorizontalOffset(_dbHorizontalOffset);

svSummaryInfo.ScrollToVerticalOffset(_dbVerticalOffset);

}
}

Please provide a code snippet for the same.
Nedyalko Nikolov
Telerik team
 answered on 08 Dec 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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?