Telerik Forums
UI for WinForms Forum
6 answers
558 views
I want to do something similar (I think) to this:
http://www.telerik.com/help/winforms/listview-custom-items.html 

What I want to do is this: I have a RadListView control with 4 columns in a ViewType of DetailsView. The first 3 columns will just display some text in each cell/row, but the 4th cell in each row I want to have a "Remove" button to remove it from the list. So what I need to be able to do is:

Create a Button element to serve as the value for the 4th cell in each row

and

Be able to define and handle the click event for that button (will need some way to identify the row that the button was clicked for as well)

The code I have right now (created based on the example) just displays the button in the first column and none of the text for the first 3 columns seems to get created/inserted.

public class ListViewItemButton : SimpleListViewVisualItem
    {
        private RadButtonElement buttonElement;
        private LightVisualElement contentElement;
        private StackLayoutPanel stackLayout;
 
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
 
            this.stackLayout = new StackLayoutPanel();
            this.stackLayout.Orientation = Orientation.Horizontal;
            this.stackLayout.EqualChildrenWidth = true;
 
            this.contentElement = new LightVisualElement();
            this.contentElement.StretchHorizontally = true;
            this.contentElement.MinSize = new Size(60, 0);
 
            this.stackLayout.Children.Add(this.contentElement);
 
            this.buttonElement = new RadButtonElement();
            this.buttonElement.Text = "Remove ";
            this.stackLayout.Children.Add(this.buttonElement);
 
            this.Children.Add(this.stackLayout);
 
        }
 
        protected override void SynchronizeProperties()
        {
            base.SynchronizeProperties();
 
            this.Text = "";
            this.buttonElement.Text = "Remove ";
        }
 
        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(SimpleListViewVisualItem);
            }
        }
    }
}

and my handler...

private void HandleRadListViewVisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e)
        {
                    e.VisualItem = new ListViewItemButton();
        }

I don't know how to tell it to only make the VisualItem be the button for the 4th column, not all of them.

Thanks,
--Jason
Ivan Todorov
Telerik team
 answered on 07 Dec 2012
2 answers
119 views
Hi 
i update code from to Q2 2011 in old version when i use RadGrirdView and i type in Filter Text 
to get me certain rows as in my attachment ,when use the following code it not get me the result row 

DataRowView m_dgrvCurrent;
 
m_dgrvCurrent = (DataRowView) (radGridViewCountries.DataSource as BindingSource).Current;

Please tell me how i can get the Filter rows not seletedrow 
this code run before fine but here get me a first row in all data not viewed on Grid 

Thank you 
Mahmoud Salem
Plamen
Telerik team
 answered on 07 Dec 2012
2 answers
252 views
Hello,

how can I change the background color of a radRichTextBox? I tried to change the BackColor in the Properties section but this didn't affect the result. In Addition I tried to implement it to the code like this: 

this.RichTextBox1.RichTextBoxElement.BackColor = System.Drawing.Color.Gray;
Markus
Top achievements
Rank 1
 answered on 07 Dec 2012
1 answer
174 views
Hello can we expect a new version of visual style builder for winforms? if so what would be the ETA?

Thank you
Stefan
Telerik team
 answered on 06 Dec 2012
3 answers
165 views
Hello,

I try to create a relation between the MasterTemplate and a ChildTemplate.

The DataSources for the templates have to be filled manually, due they come from different sources (REST and .Net-Remoting).

After fill in the data, I create a relation between them

var relation = new GridViewRelation(_StockGridView.MasterTemplate);
relation.ChildTemplate = _PartsTemplate;
relation.RelationName = "PartToArticleCode";
relation.ParentColumnNames.Add("ID");
relation.ChildColumnNames.Add("ArticleCodeID");
this._StockGridView.Relations.Add(relation);

Unfortunatly... this does not work (anymore!). It worked the first time I created the form etc., but after I've added a control to a container to the form (not to the grid), the gridview refuses to show the hierarchy anymore.

Maybe someone got a clue... I haven't :(

Regards,
Steffen
Plamen
Telerik team
 answered on 06 Dec 2012
6 answers
340 views
Hi,

I am usiong RadScheduler for winforms trial version. I am trying to add multiple resources in a scheduling controls by using below code. But still these resouces are not visibale in the calendar. Please note; i am using same code as in documentation:

 

Private Sub AddResources()

 

 

Try

 

 

Dim names As String() = New String() {"Alan Smith", "Anne Dodsworth", "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"}

 

 

Dim colors As Color() = New Color() {Color.LightBlue, Color.LightGreen, Color.LightYellow, Color.Red, Color.Orange, Color.Pink, _

 

Color.Purple, Color.Peru, Color.PowderBlue}

 

Dim i As Integer = 0

 

 

For Each Name As String In names

 

 

Dim oResource As New Telerik.WinControls.UI.Resource

 

oResource.Id =

New Telerik.WinControls.UI.EventId(i)

 

oResource.Name = Name

oResource.Color = colors(i)

oResource.Visible =

True

 

oResource.Image =

Me.ilstIcons.Images(0)

 

RadScheduler1.Resources.Add(oResource)

System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)

oResource =

Nothing

 

 

Next

 

RadScheduler1.GetDayView().ResourcesPerView = 2

 

 

Catch ex As Exception

 

MessageBox.Show(ex.ToString())

 

Finally

 

 

End Try

 

 

End Sub


Thanks,

 

Ivan Todorov
Telerik team
 answered on 06 Dec 2012
3 answers
324 views
Hi,
i'm trying to make a grid look like the attached image.  i want the total part at the bottom to look like the image.  i've tried various things and i can't even get it to pin to the bottom.  
i found code on another thread that said to do this to get it to the bottom:
grdTxCodes.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;
but that doesn't work for me unless the grid has a bunch of rows in it.  when there's no rows or only a couple, the summary row is right under them.  I need it at the bottom and also need it to only show for a couple columns.  i added summary items for those columns and i do get totals, but all the other columns have what look to be cells under them that are just blank.  can those be removed?

i blacked the data in it out for security reasons.

Thanks!
Ivan Todorov
Telerik team
 answered on 06 Dec 2012
1 answer
84 views
If you have multiple appointments on one day at one time they appear beside each other.

If you have 3 appointments on 13u00, 2 of these appointments stop at 14u00 and the tird one at 17u00
If you then have another appointment that starts on 14u30 and stops at 15u30 the width of this appointment is 1/3 of the total with for the day. But there is room for this appointment to be 2/3 of the width of that day.

Has somebody an idea about how i can fix this that i can use the fully width of the column?
 
thx!
Ivan Todorov
Telerik team
 answered on 06 Dec 2012
2 answers
170 views
http://www.telerik.com/help/winforms/gridview-viewdefinitions-html-view.html

i'm copy everything in this page to my VS.

but not working TT.

someone help me please.


now i understand already thank :D
Stefan
Telerik team
 answered on 06 Dec 2012
1 answer
106 views
Before calling my report, I generate a generic list of business objects. The processing is quite complex and I do not want to try to use Telerik's parameter facility to do this. 

How can I pass this List<BusinessObject> to Telerik Reporting at runtime? What do I use as a datasource in order to design the report?
Steve
Telerik team
 answered on 05 Dec 2012
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?