Telerik Forums
UI for WinForms Forum
2 answers
38 views

I have a series of grids on a form, and all but the first one is created at runtime. Each grid has the same ValueChanged event handler attached to it. How can I tell which grid fired it?

private void ValueChanged(object sender, EventArgs e)
{

}

I tried intercepting the CellClick event (since that fires first) and getting the id from the tag property into a form-wide variable but that seems like a major kludge.

private async void CellClick(object sender, GridViewCellEventArgs e)
{
     myTag = (int)((MasterGridViewTemplate)e.Column.OwnerTemplate).Owner.Tag;
}

Any better ideas?

Thanks

Carl

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Mar 2024
1 answer
32 views

I have made a Custom Summary grouper to show summary data "inline" with grouped rows, it will be great if something similar could be done native.

I attach project example if someone is interested

Custom summary grouper example

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Mar 2024
2 answers
31 views

Is there a way, to get the RadCalendar to view similar to the calendar view in OUTLOOK.

This is what I am looking for:

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Mar 2024
0 answers
29 views

I am using the radScheduler for the first time.  I am trying to bind some data to it (or even add events programmatically) that we are receiving from an RRS feed.   Is there a simple way to do this.  The Help files are more about binging a table/dataset to it.  Note, this control is used as a READ only view of events for my customers. 

 

TIA for the help

 

 

Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
 asked on 05 Mar 2024
1 answer
36 views

I need to quickly develop an 'updater' application that allows updating one or more software. I would like a look similar to the Adobe updater. What should I choose as a component? A grid? A ListView? Is it possible to have a column in the grid that changes its appearance: switches from a button to a progress bar?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Mar 2024
2 answers
37 views

When I Hide/Collapse the FILTER button in the column header, it doesn't remove the space from the header until the user clicks in the row/header.  I must be doing something wrong. Currently, I am using the ViewCellFormatting event to hide/collapse the FilterButton. 

 

Any ideas?

 

Thanks.

Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
 answered on 28 Feb 2024
1 answer
32 views

Does anyone know a way to show rich text in a RadSpreadsheet cell?

Nothing very complicated, just bullets , bold/italic/underlined , maybe color.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Feb 2024
1 answer
29 views

I want to create a class of RadGroupBox that when I drop my class on a form, that there is no "TEXT" value.  We use the GroupBox alot in our system, /w out the HEADER TEXT.  So far, my attempts have failed.   Here is my GroupBy class.

 


   public sealed class NtsRadGroupBoxNoHeader : RadGroupBox
   {
      #region Public Constructors

      public NtsRadGroupBoxNoHeader()
      {
         Padding = new System.Windows.Forms.Padding(2);
         ThemeClassName = "Telerik.WinControls.UI.RadGroupBox";
         Text = string.Empty;
         AccessibleName = string.Empty;
         AccessibleDescription = string.Empty;
         ((Telerik.WinControls.Primitives.TextPrimitive)(GetChildAt(0).GetChildAt(1).GetChildAt(2).GetChildAt(1))).Text = string.Empty;
      }

      #endregion Public Constructors
   }

Nadya | Tech Support Engineer
Telerik team
 answered on 28 Feb 2024
1 answer
25 views

I am having issues where data getting exported to an XLSX file where some tabs are not getting the data. FileExportMode is set to FileExportMode.NewSheetInExistingFile and the file is not in use.  The weird part, is I can run the code multiple times and each time, it is different tabs that don't get populated. In the end, I  should end up with 14 tabs and I get those 14 tabs, the only thing that is in the tabs, is the headers.  if I export that data for each tabs individual to their own file, the data is there and exported as expected.  Maybe I am missing something?

Another weird part, is when I watch the file exporting (in window explorer), you can see the file go to 0KB. It is really weird

Here is my export code


         List<Tuple<int, string, bool>> jurisdictionTypes =
            new JurisdictionTypeDA().GetJurisdictionTypeKeyValueList();

         foreach (Tuple<int, string, bool> jurisdictionType in jurisdictionTypes)
         {
            RadPivotGrid tempPivotExportGrid = new RadPivotGrid
            {
               ColumnGrandTotalsPosition = TotalsPos.None,
               ColumnsSubTotalsPosition = TotalsPos.None,
               EmptyValueString = "0",
               RowGrandTotalsPosition = TotalsPos.None,
               RowsSubTotalsPosition = TotalsPos.None
            };

            var exportResults = _apportionmentInfoPivot
               .Where(app => app.JurisdictionTypeKey == jurisdictionType.Item1
               .OrderBy(app => app.PartySort)
               .ThenBy(app => app.LegacyKeyValue)
               .Select(app => new
               {
                  jurisdiction_name = app.JurisdictionName?.Trim() ?? string.Empty,
                  party_name = app.PartyName?.Trim() ?? string.Empty,
                  totalvoters = app.TotalVoters,
                  signaturesneeded = app.SignaturesNeeded
               })
               .ToList();

            tempPivotExportGrid.DataSource = exportResults;
            tempPivotExportGrid.RowGroupDescriptions.Clear();
            tempPivotExportGrid.ColumnGroupDescriptions.Clear();
            tempPivotExportGrid.AggregateDescriptions.Clear();

            // Row Information
            PropertyGroupDescription myRows = new PropertyGroupDescription
            {
               PropertyName = "jurisdiction_name",
               CustomName = "Jurisdiction",
               SortOrder = Telerik.Pivot.Core.SortOrder.None
            };

            tempPivotExportGrid.RowGroupDescriptions.Add(myRows);

            // Column Information
            PropertyGroupDescription myCols = new PropertyGroupDescription
            {
               PropertyName = "party_name",
               CustomName = "Party",
               SortOrder = Telerik.Pivot.Core.SortOrder.None
            };
            tempPivotExportGrid.ColumnGroupDescriptions.Add(myCols);

            // Aggregate Information
            tempPivotExportGrid.AggregateDescriptions.Add(new PropertyAggregateDescription()
            {
               PropertyName = "totalvoters",
               CustomName = "Count",
               AggregateFunction = AggregateFunctions.Sum,
               StringFormat = "#,##0"
            });

            tempPivotExportGrid.AggregateDescriptions.Add(new PropertyAggregateDescription()
            {
               PropertyName = "signaturesneeded",
               CustomName = "Needed",
               AggregateFunction = AggregateFunctions.Sum,
               StringFormat = "#,##0"
            });

            tempPivotExportGrid.AggregatesPosition = PivotAxis.Columns;

            // Combine each result into a new tab
            PivotGridSpreadExport spreadExport = new PivotGridSpreadExport(tempPivotExportGrid)
            {
               SheetName = jurisdictionType.Item2,
               FileExportMode = FileExportMode.NewSheetInExistingFile
            };
            spreadExport.RunExport(myExportFile, new SpreadExportRenderer());

            // Send each result to their own sheet
            PivotGridSpreadExport mySpreadExport2 = new PivotGridSpreadExport(tempPivotExportGrid)
            {
               SheetName = jurisdictionType.Item2,
               FileExportMode = FileExportMode.CreateOrOverrideFile
            };
            string newfile = string.Concat(Path.Combine(Path.GetDirectoryName(myExportFile) ?? string.Empty, Path.GetFileNameWithoutExtension(myExportFile)), "_", jurisdictionType.Item2, Path.GetExtension(myExportFile));
            mySpreadExport2.RunExport(newfile, new SpreadExportRenderer());


         }

Due to the nature of the data, I can't share the results, so I will try to re-create this in a temp project.

 

I have attached a like to a video, you can see at 4 seconds and 9 seconds, the file is emptied (0 KB).

https://app.screencast.com/6SjZNCAoooWUh

TIA for any help here.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 27 Feb 2024
1 answer
15 views
The reading path image displays an error, the program code is as follows:
private void button1_Click(object sender, EventArgs e)
{
    OpenFileDialog _file = new OpenFileDialog();
    _file.InitialDirectory = ".";
    _file.Filter = "JPG(*.JPG;*.JPEG);|";
    _file.ShowDialog();
    if (_file.FileName != string.Empty)
    {
        string ProfilePicturePathName = _file.FileName;

        // Telerik --->>>   "System.Xml.XmlException: 'There are invalid characters in the specified encoding"
        radPictureBox1.SvgImage = RadSvgImage.FromFile(ProfilePicturePathName);

        // windows is ok
        pictureBox1.Image= Image.FromFile(ProfilePicturePathName);
    }
}
Nadya | Tech Support Engineer
Telerik team
 answered on 23 Feb 2024
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
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
+? more
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?