Telerik Forums
UI for WinForms Forum
1 answer
226 views
I use radgridview control to fill tablea and tableb datasource.
in frmA and frmB I use same mothod 
 set radgridview property->summaryrowsbottom->sum filedname
in frmA recordset count is 10 ->radgridview summary display ok (sql: select * from table a)
but in frmB recordset count is 300 ->radgridview summary can't display from the gridview bottom  (sql:select * from tableb)

if frmB recordset count is 10  ->radgridview summary display ok (sql:select top 10 * from tableb)
how can i display summaryrowsbottom value in a lot of rows?
thanks!

2013.03.28
 
I use code 
private RadGridView radGridView1;
private GridViewSummaryItem  summaryItem1;
  
  private void LoadData()
{
tbladapter.fillbydate(ds.tbla,begindate,enddate);
     summaryItem1 = new GridViewSummaryItem("Id", "Sum of Id: {0}", GridAggregateFunction.Sum);
     var summaryRow1 = new GridViewSummaryRowItem(new[] {summaryItem1});

       //if I add onece the radgridview can't display in 299 recordset
        radGridView1.SummaryRowsBottom.Add(summaryRow1);     
       //if I add two same method the radgridview can display summary ok 
       radGridView1.SummaryRowsBottom.Add(summaryRow1);     

}




Julian Benkov
Telerik team
 answered on 29 Mar 2013
2 answers
266 views
How can a numbered (or bulleted) list be inserted into a rich text box programmatically?
Igor
Top achievements
Rank 1
 answered on 29 Mar 2013
4 answers
747 views

Hello,

 

I have a gridview which display workitemdata. The columns are "The client", "The service contract", "The Employee", "The Date", "Hours", "Description", "price hour" and "Value (price hour * hours). The client, service contract and employee are ID value not string.

 

I have made a three level grouping on Client, service contract and Employee.

 

I have added a summary row for displaying the total of Value by group and an Handler on GroupSummaryEvaluate for displaying an human readable string instead of ID.

 

But I'm stuck on these problems:

  1. I want only to display the subtotal (the summaryRow) on the client group level (last level). The showParentGroupSummaries properties work for each level (true) or the first level (false).
  2. The GroupSummaryEvaluate handler change the display string of my group header AND my summaryRow.
  3. What are the options for formatting my summaryRow (like text alignment, font, ...)
  4. The group sort my values on ID (column value) before grouping. Is there a way to sort on the readable string after the grouping. I could use a numeric enumeration based on my string instead of an ID for grouping. Just asking if there is a kick tip about this :-)

I join two picture (GroupSummaryEvaluate active/not active) and some code.

Imports System.Data.Objects
Imports Telerik.WinControls.UI
Imports Telerik.WinControls.Data
 
Public Class View_ValorisationTravail
 
    Private _datactx As IconEntities
    Public ReadOnly Property InnerDataContext As IconEntities
        Get
            Return _datactx
        End Get
    End Property
 
    Private _dataquery As ObjectQuery(Of Travail)
    Public Property DataQuery As ObjectQuery(Of Travail)
        Get
            Return _dataquery
        End Get
        Set(value As ObjectQuery(Of Travail))
            If _dataquery Is Nothing AndAlso value IsNot Nothing Then
                _dataquery = value
                OnDataqueryChanged()
            End If
            If Not _dataquery.Equals(value) Then
                _dataquery = value
                OnDataqueryChanged()
            End If
        End Set
    End Property
 
    Private Sub View_ValorisationTravail_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If Not Me.DesignMode Then
            _datactx = New IconEntities(GetConnection())
 
            'Temporaire en attendant les filtres
            Me.DataQuery = GenerateDataQuery()
        End If
 
        IntitialiseGroupValorisationTravaux(Me.RadGridView1)
 
        Dim summaryItem As New GridViewSummaryItem("Valeur", "{0:N2} CHF", GridAggregateFunction.Sum)
        Dim summaryItemLabel As New GridViewSummaryItem("CHFparheure", "TOTAL", GridAggregateFunction.Sum)
        Dim summaryRowItem As New GridViewSummaryRowItem()
        summaryRowItem.Add(summaryItem)
        summaryRowItem.Add(summaryItemLabel)
        Me.RadGridView1.SummaryRowsBottom.Add(summaryRowItem)
        Me.RadGridView1.MasterTemplate.ShowParentGroupSummaries = True
    End Sub
 
    Private Sub OnDataqueryChanged()
        Me.RadGridView1.DataSource = DataQuery.Execute(MergeOption.OverwriteChanges).ToList
    End Sub
 
    ''' <summary>
    ''' Generating an ObjectQuery for test purpose
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Private Function GenerateDataQuery() As ObjectQuery(Of Travail)
        Dim query = From c In _datactx.Travail
                    Select c
 
        Return query
    End Function
 
    Private GroupClientDescriptor As GroupDescriptor
    Private GroupPrestationDescriptor As GroupDescriptor
    Private GroupCollaborateurDescriptor As GroupDescriptor
 
    ''' <summary>
    ''' Build the group
    ''' </summary>
    ''' <param name="aGridView"></param>
    ''' <remarks></remarks>
    Private Sub IntitialiseGroupValorisationTravaux(aGridView As RadGridView)
        aGridView.EnableGrouping = True
        aGridView.AutoExpandGroups = True
        aGridView.GroupDescriptors.Clear()
 
        Dim SortClientDescriptor As New SortDescriptor("Client", System.ComponentModel.ListSortDirection.Ascending)
        GroupClientDescriptor = New GroupDescriptor()
        GroupClientDescriptor.GroupNames.AddRange(New Telerik.WinControls.Data.SortDescriptor() {SortClientDescriptor})
 
        Dim SortPrestationDescriptor As New SortDescriptor("Prestation", System.ComponentModel.ListSortDirection.Ascending)
        GroupPrestationDescriptor = New GroupDescriptor()
        GroupPrestationDescriptor.GroupNames.AddRange(New Telerik.WinControls.Data.SortDescriptor() {SortPrestationDescriptor})
 
        Dim SortCollaborateurDescriptor As New SortDescriptor("Collaborateur", System.ComponentModel.ListSortDirection.Ascending)
        GroupCollaborateurDescriptor = New GroupDescriptor()
        GroupCollaborateurDescriptor.GroupNames.AddRange(New Telerik.WinControls.Data.SortDescriptor() {SortCollaborateurDescriptor})
 
        aGridView.GroupDescriptors.AddRange(New Telerik.WinControls.Data.GroupDescriptor() {GroupClientDescriptor, GroupPrestationDescriptor, GroupCollaborateurDescriptor})
    End Sub
 
    Private Sub Travaux_GroupSummaryEvaluate(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GroupSummaryEvaluationEventArgs) Handles RadGridView1.GroupSummaryEvaluate
        If e.Group.GroupDescriptor.Equals(GroupClientDescriptor) Then
            If e.Group.ItemCount > 0 AndAlso e.Group.Item(0).DataBoundItem IsNot Nothing Then
                e.FormatString = CType(e.Group.Item(0).DataBoundItem.Client, Client).Display
            End If
        ElseIf e.Group.GroupDescriptor.Equals(GroupPrestationDescriptor) Then
            If e.Group.ItemCount > 0 AndAlso e.Group.Item(0).DataBoundItem IsNot Nothing Then
                e.FormatString = CType(e.Group.Item(0).DataBoundItem.Prestation, Prestation).Display
            End If
        ElseIf e.Group.GroupDescriptor.Equals(GroupCollaborateurDescriptor) Then
            If e.Group.ItemCount > 0 AndAlso e.Group.Item(0).DataBoundItem IsNot Nothing Then
                e.FormatString = CType(e.Group.Item(0).DataBoundItem.ContratEngagement.Collaborateur, Collaborateur).DisplayName
            End If
        End If
    End Sub
 
End Class
Julian Benkov
Telerik team
 answered on 29 Mar 2013
1 answer
116 views
Hello 
In my website I have lots of pages using Comboox component
Users browsing with IExplorer 10 have revealed that the combo were empty, even if they are correctly bound to sql database
I do not have IE10; with Chrome, Firefox and former versions of IExplorer all is OK.
How can i fix this 'bug'? Is it just a problem of Sitefinity updates?
Is it possible to force a WebApplication to open in IE10 in compatibility mode?
Thanks in advance
Diego
Pavel Benov
Telerik team
 answered on 29 Mar 2013
5 answers
303 views
I am getting this error in my designer file.

            //
            // radPageViewPage_Template
            //
// TODO: Code generation for '' failed because of Exception 'Invalid Primitive Type: System.IntPtr. Consider using CodeObjectCreateExpression.'.
            this.radPageViewPage_Template.Controls.Add(this.radGridView_PlanTemplates);
            this.radPageViewPage_Template.Location = new System.Drawing.Point(10, 37);
            this.radPageViewPage_Template.Name = "radPageViewPage_Template";
            this.radPageViewPage_Template.Size = new System.Drawing.Size(307, 502);
            this.radPageViewPage_Template.Text = "Templates";
Jack
Telerik team
 answered on 28 Mar 2013
9 answers
295 views
Is there a way to change the Navigation text for the Month view to not show the dates but rather the month as in Outlook


Stefan
Telerik team
 answered on 28 Mar 2013
3 answers
207 views
How to set font styles with colors while grouping Grid View Rows??
Jack
Telerik team
 answered on 27 Mar 2013
3 answers
817 views
Hello,

in my DataGridView I have a column for E-Mail adresses. The user clicks on the E-Mail adress and my programm opens a new E-Mail.
When the mouse is over the E-Mail adress I have this CellMouseMove Event to change the Cursor (to Cursor.Hand): 
private void dg_CustomerContact_CellMouseMove(object sender, MouseEventArgs e)
        {
            GridDataCellElement cell = this.dg_CustomerContact.RootElement.ElementTree.GetElementAtPoint(e.Location) as GridDataCellElement;
            if (cell != null && ((GridViewDataColumn)cell.ColumnInfo).Name == "dg_TalkedWith_col_Email")
            {
                originalCursor = this.dg_CustomerContact.Cursor;
                this.dg_CustomerContact.Cursor = Cursors.Hand;
            }
            else
            {
                if (originalCursor != null)
                {
                    this.dg_CustomerContact.Cursor = originalCursor;
                    originalCursor = Cursors.Default;
                }
            }
        }


But when there is no E-Mail adress the cursor should not change to "Cursor.Hand". Any suggestion how to solve this?
Anton
Telerik team
 answered on 27 Mar 2013
5 answers
309 views
Using the custom editor code sample for Telerik winforms found on the Telerik website, I override the BaseInputEditor
to provide my propertyGrid with a trackbar editor.

Now, I implemented the onEditorRequired method as explained to replace the basic edition mode for
any int property.

I'm using the RadPropertyStore mechanism to fill my property grid.

I've no problem with having the value displayed as a number when the editor is not activated, but I'm
not willing to have the value being displayed underneath the track bar as I'm editing the value.

Anyway, I would be looking for having the track bar always displayed even if the property is not being
edited as it will be used for an opacity setting.

Thanks in advance,
Antoine



Anton
Telerik team
 answered on 27 Mar 2013
1 answer
193 views
Hello,

I only want one given resource to be viewed at any point on the scheduler. I have multiple resources, but I cannot seem to find out how to toggle which resource should be viewed. It just shows the first resource I added to the collection, and then at runtime I can't see a way to toggle between those resources:



Also, I forgot to dereference a radscheduler from a navigator, and now I am unable to add a new radschedulenavigator from the toolbox as many exceptions will be thrown:

Julian Benkov
Telerik team
 answered on 27 Mar 2013
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?