Telerik Forums
UI for WPF Forum
2 answers
126 views
Hi,

I am using an aggregate function to display the sum of the column values in the footer. But in some cases I want to hide the footer text. Is this possible to do in runtime (i.e. set visibility for footer text)?

Thanks!
Petter
Top achievements
Rank 1
 answered on 24 Feb 2014
0 answers
140 views
hi
i have gridview filled with datatble,when data  is loaded ,the user can edit some column,one of this column must have only 3 value(OK,NOK,Waiting Data),for this i use validating event like this:

private void Gridswap_CellValidating(object sender, GridViewCellValidatingEventArgs e)
       {
           if (e.Cell.Column.UniqueName == "KPI Status( OK &NOK )OPTIM")
           {
               if (e.NewValue.ToString() != "OK" && e.NewValue.ToString() != "NOK" && e.NewValue.ToString() != "Waiting KPI")
               {
                   e.IsValid = false;
                   MessageBox.Show("The value must be OK,NOK or Waiting Data");
              
}               
           }
       }
for more flexibility, i want to use the same thing but with combobox,i saw all tu tutorial and documentation for using combobox with gridvieuw but doesn't work for me,some one can help me plz
thx in advance
Amine
Top achievements
Rank 1
 asked on 23 Feb 2014
1 answer
111 views
I'm doing some clipping of bars in a bar chart & am using a class derived from ChartSmartLabelsStrategyBase to place the labels in some custom locations. However, I need to also use label connectors. Those connectors are drawn when I add a ChartSeriesLabelConnectorsSettings to the BarSeries, but I need the connector to end at a different location. Right now it ends at what looks like the edge of the layout slot for the point. I need to move the endpoint to a point inside that layout slot so it makes sense with my label's final layout slot.  Is there a way to move that endpoint/change the connector geometry, etc.?

Thanks - Mitch

Boris
Telerik team
 answered on 21 Feb 2014
26 answers
850 views
When NOT autogenerating columns, it makes sense why the DataContext for a CellTemplate would be the entire row/object.  In this case when AutoGenerateColumns=False, the XAML developer is required to manually set up the data bindings; the column/property names are known to the developer.  This feature allows for multiple cell values to be combined into a single grid cell for some interesting features.

However, it makes templating cells very difficult when AutoGeneratingColumns=True because often the reason why the columns are generated automatically is that the specific names of the columns are not known ahead of time; the columns may be dynamic.  And, it's extremely difficult to get the value of the grid cell when automatically generating columns.  The bindings could be reset for every cell, but I've seen where this is not recommended, and I completely agree.

One technique I've seen is to have the DataContext of an element within the DataTemplate to scan the VisualTree hierarchy for the GridViewCell:

DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type gridView:GridViewCell}}"

This works unless you attempt to use this DataContext for a property, like a ToolTip, that doesn't live in the same VisualTree.  Attempting to bind to the parent DataContext will yield a "Cannot find element that provides DataContext." binding error during runtime.

Of course, instead of a DataRow, each row could be a collection of MVVM objects instead of a DataTable, and I could put metadata in the objects to be used to style the cells.  Unfortunately, this seems extremely inefficient and clunky.

A CellTemplateSelector with a well-crafted attached property seems to be the right way to go.  The SelectTemplate item parameter has the GridViewColumn but the value within the DataTemplate is still a DataRow.

I could convert each grid cell value with an IValueConverter into an object that pairs the cell data value with some metadata that could be used for selecting a template, but the specific column is not sent into the Convert method, so I wouldn't know what to convert it to.

I've seen many versions of this problem on your forum, but there are either no answers, or their touched on so vaguely that there not useful.  Do you know of a comprehensive and elegant solution to this common problem?


Dimitrina
Telerik team
 answered on 21 Feb 2014
5 answers
145 views
I have some content that will contain a browser window.  The browser window I am using does not work well with WPF transitions, etc. (i.e. air space issues).  So I need to Hide/Collapse the Browser portion of the content while any animations on its containing control are occurring. And I then would make the Browser window visible when the transition is complete.  Usually the content in a RADTransitionControl should not care, but there are times like above when it does.  Its ugly, but it is much better looking than the alternative.

Before obtaining the Telerik controls I had used the Transition Control from the WPF Toolkit.  I modified it to check and see if the content it was transitioning implemented an interface I created called ITransitioningAware.  If it did, it would call starting and completed methods on that interface to let the content know what is going on.  Has Telerik implemented anything similar to let the content be aware of the transitioning process?  If not, can it get onto the wish list?  I know its a special case, but that's what a lot of these kinds of features end up being for.

I could potentially implement the functionality in the parent of the TransitionControl by handling the Events it generates but I need to be aware of previous and next content to do it.  Are those available at the time of the events?

Thanks
Paul
Vladi
Telerik team
 answered on 21 Feb 2014
13 answers
183 views
Hi,

I use a WeekView definition, I set the FirstDayOfWeek to Monday and the VisibleDays to 5 to see only Monday to Friday. I add 5 appointments, 1 for each day of the week. If my computer datetime is different than Sunday, all my appointments are visible in the control. If my computer datetime is on Sunday, no one are visible in the control!!!

Thank's
Alain
Rosen Vladimirov
Telerik team
 answered on 21 Feb 2014
1 answer
76 views
Hi,

I have an appointment at 8:00 (for example) on 18/02/2014 I would like to move it on the same hour by pressing shift for example.
This mean:
If shift is pressed then change only the date of the appointment
else change the date and the time of the appointment

Regards
Yana
Telerik team
 answered on 21 Feb 2014
1 answer
101 views
Hello,
I've just got 2 question on RadMaskedInput...
  1. I'm using a RadMaskedNumericInput inside a CellEdit with a CellTemplateSelector , if I click tab it's successfully update the value, if I press Enter nothing happens... how can I handle this? I need at the Enter key to save and exit the cell
  2. I've some fields that are Int? and Decimal? I need to have them null without the validation to appear...is there a way I can turn it off?

Thanks

Petar Mladenov
Telerik team
 answered on 21 Feb 2014
1 answer
220 views
I am trying to setup a RadGridView bound to the a collection similar to the following:
​
public partial class JobDTO
{
    public int Id { get; set; }
    public string JobNumber { get; set; }
 
    public ObservableCollection<MachineTrackerDTO> MachineList { get; set; }
    public ObservableCollection<FixtureTrackerDTO> FixtureList { get; set; }
 
    public JobDTO()
    {
        MachineList = new ObservableCollection<MachineTrackerDTO>();
        FixtureList = new ObservableCollection<FixtureTrackerDTO>();
    }
 
}


I would like the have the MachineList and FixtureList collections as child tables (HierarchyChildTemplate) when displaying the RadGridView, but I also want control of the columns, formats, etc. of the child lists.  For a single child table, this is very easy (from the examples) using HierarchyChildTemplate.  However, I can't figure out how to accomplish with multiple child tables that are at the same level.

Is this possible?

Thanks,
Tim
Dimitrina
Telerik team
 answered on 21 Feb 2014
2 answers
134 views
Hello.
I'm having some problems with binding values with autoselect value from database.
My grid looks like:
(...another columns...)
<telerik:GridViewComboBoxColumn UniqueName="groupCol" DataMemberBinding="{Binding groupList}"  DisplayMemberPath="name"  SelectedValueMemberPath="gid" Header="Group" >

</telerik:GridViewComboBoxColumn>

And in code behind:


using (SqlCommand cmd = new SqlCommand("SELECT ISNULL(groupID, 0) as gid, (...other values...) ", conn))
                    {
                        using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
                        {
                            DataTable dt = new DataTable();
                            sda.Fill(dt);
                            cardsDG.ItemsSource = dt.DefaultView;
                            ((GridViewComboBoxColumn)this.cardsDG.Columns["groupCol"]).ItemsSource = getGroups();
                        }
                    }

Method to get groups is just select groupID as gid, name from myTable, and add to List<groupList> with public int gid, public string name.

What I'd like to reach is that, if select return ID = 10, I want to select this element in combobox, if isnull is reached, then nothing is selected.
What I'm doing wrong?

Yoan
Telerik team
 answered on 21 Feb 2014
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?