Telerik Forums
UI for WinForms Forum
1 answer
295 views

Hello all.  I'm trying to figure out how to configure a summaryrow to evaluate only the selected rows when multiple rows are selected.  The evaluation event handler would need to fire and update the summary total each time the selected rows collection changes.  So far I have not been able to find any examples of this behavior.  A point in the right direction will be appreciated. 

I have tried working with the "CustomSummaryItem" from the forum but this only fires the evaluation event once and doesn't summarize changing selections- it only evaluates the first row in the grid.  I have this small bit of code posted below and my alteration is in bold.  I suspect I need to subscribe to some other (less documented) method.

Thanks in advance - Mike

I found this class in the forum ----------------------------------

Public Class CustomSummaryItem
    Inherits GridViewSummaryItem
    Public Sub New(ByVal name As String, ByVal formatString As String, ByVal aggregate As GridAggregateFunction)
        MyBase.New(name, formatString, aggregate)
    End Sub

    Public Overrides Function Evaluate(ByVal row As IHierarchicalRow) As Object
        Dim itemsummary As Decimal = 0
        For Each childRow As GridViewRowInfo In row.ChildRows
            If childRow.IsSelected Then
                itemsummary += CDec(childRow.Cells("miles_driven").Value)
            End If
        Next childRow
        Return itemsummary
    End Function

End Class

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Feb 2022
1 answer
125 views

I am using the following code in the currentpagechanged event to update a spin editor, but the spin editor value does not stay in sync with the Navigator text box when changing pages via the Navigator or clicking on the thumbnails.  

 

private void radPdfViewer1_CurrentPageChanged(object sender, CurrentPageChangedEventArgs e)
        {
            try
            {
                seFrom.Value = int.Parse(this.radPdfViewerNavigator1.CurrentPageTextBox.Text) ;
            }
            catch
            {

            }
        }

Dimitar
Telerik team
 answered on 08 Feb 2022
1 answer
210 views

I have a RadForm. I added a RadImageButtonElement (CreatingButton.png) to the Title Bar of it because I want to add a Login type of button.

1.) How can I get that button to behave like the Minimize/Maximize buttons in terms of like when I hover over the button, it changes it's appearance the same way like in the attached MinimizeAppearence.png?

I tried to use EnableHighlight, HighlightColor properties, but it didn't seem to work. It had no effect.

2.) Is there a way when I click on the RadImageButtonElement and I signed in already to have something that looks like the way Microsoft Word does it (WordSignIn.png)?

 

Thanks in advance.

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Feb 2022
1 answer
423 views

1.  Is there a way to hide an element in the pdfNaviagotor bar.  I wish to hide the file open element.

2. how can i get the path of the file that is open or loaded into the pdfviewer.

3. How do I get the page number of the selected page in the viewer

4. How do I get the page count of the open file.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Feb 2022
2 answers
619 views

Hello,

i have a sql Database with a imagepath.

How can i show the image in a colum

datasource ist a string with a filepath in the database.

 

Thanks Udo

Udo
Top achievements
Rank 1
Iron
 updated answer on 04 Feb 2022
1 answer
325 views

hi

my code is


void BindGridDeviceName() { string select = "SELECT * from Device;"; using (IDbConnection connection = new SqlConnection(DataLayer.ConnectionClass.ConnectionDaynamic.GetConnectionString)) { var list = connection.ExecuteReader(select); DataTable dt = new DataTable(); dt.Load(list); ((GridViewComboBoxColumn)radGridViewService.Columns["DeviceName"]).DataSource = dt; ((GridViewComboBoxColumn)radGridViewService.Columns["DeviceName"]).DisplayMember= "DeviceName"; ((GridViewComboBoxColumn)radGridViewService.Columns["DeviceName"]).ValueMember = "Id"; } }

 

 

------------------------------------

I want when my form is loaded
  The first item or ID from the combo box for each row is in select(show)

I do not want to be displayed by clicking on cells

like combobox.SelectedIndex

2-how to get value cValueMember = "Id" to insert database

thank


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Feb 2022
1 answer
132 views
The problem was that this popup is stretched to fit the entire screen. I've added a few lines of code to set the maximum size of this popup and it works fine. However, for the first click, popup is aligned to the left corner of the screen. I tried to set Location property of DropDownMenu and DropDownMenu.PopupElement, but it didn't help.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Feb 2022
1 answer
178 views

I set the datasource to a query ( CatQuery)

This loads the control with 2 columns- serialID and catText

How do I get these two values of the selected item of the dropdown.  

 

Thank you

 

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Feb 2022
1 answer
215 views

This is probably a very trivial issue, but - just starting with UI for Winforms - I am unable to access the data apparently loaded in the workbook below  (what I am trying to do is to load an excel file in a Worksheet to use it in a datatable)

When I run this, it goes well, but the only output displayed by the Debug.Writeline instruction is :

 "> Telerik.Windows.Documents.Spreadsheet.Model.RangePropertyValue`1[Telerik.Windows.Documents.Spreadsheet.Model.ICellValue]"

 

Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click

        Dim fileName As String = "C:\Users\patrick\testfile.xlsx"
        Dim MyWorkbook As New Telerik.Windows.Documents.Spreadsheet.Model.Workbook
        Dim WorkbookFormatProvider As New XlsxFormatProvider()
        Dim MyInput As New FileStream(fileName, FileMode.Open)
        MyWorkbook = WorkbookFormatProvider.Import(MyInput)
   
        Dim MySheet As Worksheet = MyWorkbook.Sheets.ActiveSheet
        RadSpreadsheet1 = MyWorkbook.Sheets

        Dim Res As String = MySheet.Cells(1, 1).GetValue().ToString
        Debug.WriteLine(" > " & Res)
       
    End Sub

 

Can someone be kind to tell me what I do wrong ?

Thanks

(using Win 11, VS 2019, DEvCraft UI)

Svilen
Telerik team
 answered on 02 Feb 2022
1 answer
113 views

Hi,

I'm trying to render HTML data as a title in the dock window caption element. Although it renders the HTML data as expected, it does overlap with the Window State & Dock buttons. I tried applying text trimming using CSS properties but It didn't work. How to avoid overlapping?

Attached a sample

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Feb 2022
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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?