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;
}
}
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.
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?
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.
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
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
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
; }
}
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.