Telerik Forums
UI for WinForms Forum
4 answers
813 views
Hello,
My intention is to calculate the sum of all the values of a column, where this column was selected as a grouping column.
I'd like to show the result directly in the grouping header row.

This is the code I'm using:
string ColumnName = "Price";
GroupDescriptor descriptor1 = new GroupDescriptor();
descriptor1.GroupNames.Add(ColumnName, ListSortDirection.Ascending);   
 
string formatStr  = "The total sum of items {0} with price equal to {1} is equal to {2}.";  
descriptor1.Format = formatStr;
descriptor1.Aggregates.Add("Sum('" + ColumnName + "')");
this.radGridView1.GroupDescriptors.Add(descriptor1);

In this code my intention is to calculate and show the total sum of all the items grouped by the price itself.

The problem is the result is alway zero. It seems like the GridAggregateFunction.Sum doesn't works inside the GroupDescriptor

I tryed exacly the same code using the COUNT aggregate function instead of the SUM, ad it works perfectly giving me the count of the item grouped by the price:
string ColumnName = "Price";
GroupDescriptor descriptor1 = new GroupDescriptor();
descriptor1.GroupNames.Add(ColumnName, ListSortDirection.Ascending);  
  
string formatStr  = "The total sum of items {0} with price equal to {1} is equal to {2}."; 
descriptor1.Format = formatStr;
descriptor1.Aggregates.Add("Count('" + ColumnName + "')");
this.radGridView1.GroupDescriptors.Add(descriptor1);

Thanks for any suggestions,
Alcide Burato
Alcide Burato
Top achievements
Rank 1
 answered on 28 Apr 2011
4 answers
779 views
We are changing all of our standard WinForms labels to RadLabels. This has been working fine until today when we ran into a label that used the AutoEllipsis property.

Does the RadLabel have something similar to the WinForms AutoEllipsis on a label?

If not, is there a work around?
Deborah
Top achievements
Rank 1
 answered on 28 Apr 2011
2 answers
187 views
hi
i create a telerik ribbon form and set right to left property to true
and good work
but if right to left layout set to true made a problem
left border is damage
Stefan
Telerik team
 answered on 28 Apr 2011
6 answers
595 views
Hello, I'm using RadControls for Winforms Q2 2010. 

I have the following to create a GridCommandCellElement

Private Sub AddTaskDetailCommand()
    Dim commandColumn As New GridViewCommandColumn
    With commandColumn
      .Name = "ViewTaskDetail"
      .FieldName = "AssetChecklistID"
      .HeaderText = String.Empty
      .Width = 30
      .AllowFiltering = False
      .AllowGroup = False
      .AllowHide = False
      .AllowResize = False
      .AllowSort = False
    End With
    RadGridView1.MasterTemplate.Columns.Insert(0, commandColumn)
    AddHandler RadGridView1.CommandCellClick, AddressOf RadGridView1_CommandCellClick
 
  End Sub

And then the following in the CellFormatting event...

Private Sub RadGridView1_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles RadGridView1.CellFormatting
 
    If (TypeOf (e.CellElement) Is GridCommandCellElement) Then
      Dim cmdCell = DirectCast(e.CellElement, GridCommandCellElement)
      Dim colName = cmdCell.ColumnInfo.Name
 
      If colName = "ViewTaskDetail" Then
        e.CellElement.ToolTipText = "View Task Details..."
        cmdCell.CommandButton.DisplayStyle = DisplayStyle.Image
        cmdCell.CommandButton.Image = My.Resources.tag_blue_edit
      End If
 
    End If
 
  End Sub

Problem is that the tooltip is not visible when hovering over the command button in the cell. There is a small bit of padding in the cell that will display the tooltip when hovering over that, but not over the command. 

Can seem to find a ToolTipText property for the GridCommandCellElement. Is there something I am missing?

Cheers,

Paully


Stefan
Telerik team
 answered on 28 Apr 2011
1 answer
248 views
I would like to disable drag row selecting as described in http://mono.telerik.com/Grid/Examples/Client/Selecting/DefaultCS.aspx. The problem is that I can't seem to find this property in the winforms.ui radgridview control. The main reasons I want to disable this is that when we scroll the vertical scroll bar in our gridview is is very easy to slide our cursor slightly off the scroll bar and then the rows get selected. Which is not something we like. So where do i find this property in the winforms version of radgridview?

I assume this line as shown in the link above refers only to you web.ui radgrid?
RadGrid1.ClientSettings.Selecting.EnableDragToSelectRows = status;

Thank you,
Denis
Stefan
Telerik team
 answered on 28 Apr 2011
2 answers
189 views
How does one go about removing the timezone combo box from the navigator?
Stefan
Telerik team
 answered on 28 Apr 2011
5 answers
227 views


I Have a Column in RadGRidView Control for Windows having data type (Values) in Decimal and its format  String is {0:N}.
When I type any Special Character in the Filter Text box , Application Goes Crash immediately.
How i Can Catch its Events or Avoid this Situation.



Naama
Top achievements
Rank 1
 answered on 28 Apr 2011
0 answers
194 views
i want show child form as tab
how to i can?
ali
Top achievements
Rank 1
 asked on 28 Apr 2011
3 answers
160 views
Hi,

Using the RadMenu, I'm not able to add an ActionCommand using special chord, like CTRL+{LEFT ARROW} or CTRL+{HOME}.

How can I achieve that?

Thanks!
Nikolay
Telerik team
 answered on 27 Apr 2011
3 answers
188 views
Hi,


        I have ribbionbar in that i have raddropdownbuttonelement  when i click this i want a small colorpicker to apper below the dropdown .And from that picker if i select one color then the entire application should change to that color can anyone please post  the code how to do . Refer screenshot



Thanks
Divya
Peter
Telerik team
 answered on 27 Apr 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?