Telerik Forums
UI for WinForms Forum
1 answer
116 views

I have a custom visual item class derived from RadListVisualItem. My custom visual item is being created in the CreatingVisualListItem event, but the "Padding" property is ignored. I've tried Margin, as well, but no luck. My class is below. What am I missing?

 

public class CustomVisualItem : RadListVisualItem
{
DockLayoutPanel mainContainer;
StackLayoutElement leftColumn;
StackLayoutElement rightColumn;
LightVisualElement titleElement;
LightVisualElement photoElement;

private ImagePrimitive image;
public ImagePrimitive Image
{
get
{
return this.image;
}
}

protected override Type ThemeEffectiveType
{
get
{
return typeof(RadListVisualItem);
}
}

protected override void CreateChildElements()
{
base.CreateChildElements();

mainContainer = new DockLayoutPanel();
leftColumn = new StackLayoutElement();
rightColumn = new StackLayoutElement();
photoElement = new LightVisualElement();
titleElement = new LightVisualElement();

this.Children.Add(mainContainer);
mainContainer.LastChildFill = true;

leftColumn.Orientation = Orientation.Vertical;
leftColumn.Children.Add(photoElement);
photoElement.DrawBorder = true;
photoElement.Shape = new CircleShape();
photoElement.BackColor = Color.Transparent;
photoElement.BackColor2 = Color.Transparent;
photoElement.BackColor3 = Color.Transparent;
photoElement.BackColor4 = Color.Transparent;
photoElement.AutoSize = false;

rightColumn.Orientation = Orientation.Vertical;
rightColumn.Children.Add(titleElement);
titleElement.Padding = new Padding(50);
titleElement.AutoSize = false;
titleElement.DrawBorder = true;
titleElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders;
titleElement.BorderLeftWidth = 0;
titleElement.BorderTopWidth = 1;
titleElement.BorderRightWidth = 0;
titleElement.BorderBottomWidth = 0;

mainContainer.Children.Add(leftColumn);
mainContainer.Children.Add(rightColumn);
DockLayoutPanel.SetDock(leftColumn, Telerik.WinControls.Layouts.Dock.Left);
DockLayoutPanel.SetDock(rightColumn, Telerik.WinControls.Layouts.Dock.Right);
leftColumn.NotifyParentOnMouseInput = true;
rightColumn.NotifyParentOnMouseInput = true;
titleElement.NotifyParentOnMouseInput = true;
photoElement.NotifyParentOnMouseInput = true;
}
}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Aug 2019
6 answers
223 views

I am having trouble just trying to get a user's currently selected cell when using this control.

https://docs.telerik.com/devtools/winforms/controls/spreadsheet/features/ui-working-with-selection.html

from this page I can't even get this to work with my control (Selection seems to not be found so I Underlined and Bolded it)

Selection selection_2 = this.radSpreadsheet.SpreadsheetElement.ActiveWorksheetEditor.Selection;

selection_2.Select(new CellIndex(0, 0), false);

yes I have all the required References added to my project and form.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Aug 2019
1 answer
98 views

Hi everyone!

I have a couple of columns containing numbers which some of them are zeros (0).I use the following code to format grid cells:

for(int i = 1; i < 6; i++)
{
    GridViewDecimalColumn myCol = this.Grid.Columns[i] as GridViewDecimalColumn;
    myCol.FormatString = "{0:###,###,###,###}";
}

As  you can tell this code turns this value: 1234567 into this: 1,234,567

But my problem is that when this formatting is applied, since some of my cells contain the value "0", all of them will be blank and empty. It's like nothing exists in that cell but if I remove the formatting, all zeros are again where they should be.

I believe this problem is probably because of the type of "GridViewDecimalColumn" class.

What's your suggestion?

Nadya | Tech Support Engineer
Telerik team
 answered on 27 Aug 2019
1 answer
249 views
Hi. I want to add a separator (horizontal line) item to my radDropDownList. I've followed the approach at https://www.telerik.com/forums/adding-some-separator-in-the-list which works. However I have 2 items that have empty string as the text and I only want one of them to be shown as a horizontal line. I'm using a data bound list and I'd like to use either the item's value or it's tag to determine whether to show the item as a horizontal line or not. How do I get the item's value or it's tag from the VisualListItemFormatting event?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Aug 2019
1 answer
946 views

Dear Admins.

I'm Using radGridView, It have Some Summay Columns Added using the Code Below.

1.GridViewSummaryItem sumAmount = new GridViewSummaryItem
2.{
3.       Name = "Amount",
4.       FormatString = "{0:N2}",
5.       Aggregate = GridAggregateFunction.Sum
6.};
7.GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem(new GridViewSummaryItem[] { sumAmount,});
8.radGridView1.MasterTemplate.SummaryRowsBottom.Add(summaryRowItem);

 

How can i Access the Summary Item Values.

Do i have to iterate the GridView rows to Calculate the Sum or is there any easy way to access the Value. 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Aug 2019
3 answers
152 views

Hi there

I'm trying to show a tooltip on a RadPanel. Normally I'm using the ToolTipTextNeeded event for every Telerik control I used before. But this seem not to work here. I also tried the ToolTipText property on RadPanel.PanelElement. I also set AutoToolTip to true, without any success. What I tried:

1.private void panFiles_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e)
2.{
3.    e.ToolTip.ToolTipTitle = "test1";
4.}

 

1.panFile1.ShowItemToolTips = true;
2.panFile1.PanelElement.AutoToolTip = true;
3.panFile1.PanelElement.ToolTipText = "test2";

 

1.panFile1.PanelElement.PanelFill.AutoToolTip = true;
2.panFile1.PanelElement.PanelFill.ToolTipText = "test";

 

However, the tooltip is still not showing up. I cannot find any information about it in the RadPanel documentation. Is this even possible for this control?

Best Regards,
Roman

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Aug 2019
1 answer
282 views

I am using the RadCommandBar, and for the strip elements I have the overflow visibility set to collapse, as I don't want the user to turn the command items off or hide them.  When I resize, the Controls in the strip elements disappear and only a reduced-sized footprint of the right-most strip elements appear (see attached),  with no ability to select the control contained within.

I think the best solution would be to automatically move these to a new row in the CommandBar as the size of the form is reduced, then move them back to the top row as form is expanded again.  I assume I could do this in the form.resize event, checking the width of command bar, but i'm not sure all the nested properties I would need to manipulate to accomplish this.

Please let me know how to accomplish this, or if there is a setting I am missing that might achieve my described desired result.  Basically, I'm looking for a solution that prevents the user from hiding the buttons or strip elements, but still provide access to the buttons when the form is resized.

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Aug 2019
31 answers
601 views
Hi,

May I know whether it is possible to customize the printouts Header and Footer in the Print Preview and actual report?

I'm trying to print directly from the RadGridView as I have nicely formatted the look and feel, and I need to print exactly what I've formatted to display on screen, with my Header and Footer, for example Header could be Company Name and Report Title, while the footer would be company address and contact numbers.

Please kindly advise me accordingly.

Thank you!

Cheers,
Jenson 
Dimitar
Telerik team
 answered on 23 Aug 2019
7 answers
100 views
The data source for my main GridView object is a list of a custom object, which in turn contains child objects, and I want to be able to create a hierarchy grid that allows the user to drill into these child objects. I understand how to create the hierarchy if the entire row is a child record, but not how to accomplish this when a cell is the child record.

Example of my custom object is below.
public class Claim
{
    public Claim();
 
    //
    // Summary:
    //     Provider billing for services
    public Provider BillingProvider { get; set; }
    //
    // Summary:
    //     Claimant
    public Claimant Claimant { get; set; }
    //
    // Summary:
    //     Claim number
    public string ClaimNumber { get; set; }
    //
    // Summary:
    //     Member
    public Member Member { get; set; }
    //
    // Summary:
    //     Policy
    public Policy Policy { get; set; }
    //
    // Summary:
    //     Process date
    public DateTime ProcessDate { get; set; }
    //
    // Summary:
    //     Date claim was received
    public DateTime ReceiveDate { get; set; }
    //
    // Summary:
    //     Provider rendering services
    public Provider RenderingProvider { get; set; }
    //
    // Summary:
    //     List of services provided
    public List<Service> ServiceList { get; set; }
    //
    // Summary:
    //     Address where services were provided
    public Address ServiceLocation { get; set; }
    //
    // Summary:
    //     Worksheet / bill number
    public int Worksheet { get; set; }
}
//
// Summary:
//     Member
public class Member : Person
{
    public Member();
 
    //
    // Summary:
    //     Effective date
    public DateTime EffectiveDate { get; set; }
    //
    // Summary:
    //     Member ID
    public string MemberId { get; set; }
    //
    // Summary:
    //     Member's coverage policy
    public Policy Policy { get; set; }
    //
    // Summary:
    //     Termination date
    public DateTime TerminationDate { get; set; }
}
//
// Summary:
//     Person
public class Person
{
    public Person();
 
    //
    // Summary:
    //     Contact address
    public Address Address { get; set; }
    //
    // Summary:
    //     Date of birth
    public DateTime Dob { get; set; }
    //
    // Summary:
    //     First name
    public string FirstName { get; set; }
    //
    // Summary:
    //     Gender
    public string Gender { get; set; }
    //
    // Summary:
    //     Last name
    public string LastName { get; set; }
    //
    // Summary:
    //     Middle name
    public string MiddleName { get; set; }
    //
    // Summary:
    //     Social security number
    public string Ssn { get; set; }
}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Aug 2019
1 answer
230 views

The below code works in a Tererik report

                    Me.txt001.Value = drw("int001")
                    Me.txt002.Value = drw("int002")
                    Me.txt003.Value = drw("int003")

where drw is a DataRow

I have around 600 controls on a report and need to be able to loop through the various textboxes.

The following works in a Visual Studio Form but not in a Telerik report

                    For intCounter As Integer = 1 To 3
                        Me.Controls("txt00" & CStr(intCounter)).Text = drw("int00" & CStr(intCounter)).ToString
                    Next

It does not like Me.Controls("txt00" & CStr(intCounter)).Text

Any ideas, otherwise I would have to painstakingly refer to all controls by name.

Thanks.

 

 

 

 

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 21 Aug 2019
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
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
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
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
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
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?