Telerik Forums
UI for WinForms Forum
6 answers
418 views
Hello,
I found some problems trying to use the RadHostItem control to customize the cells of a RadGridView.
I developed a class (MyCell) that derives from GridDataCellElement; in such class, the RadHostItem hosts a RadTextBox control.
In the CreateCell event of the RadGridView, I set the cell tyle as typeof(MyCell).
Everything works fine, the RadTextBox control appears in the Grid cells but, and this is the problem I'd need to solve, when I scroll down the Grid, the RadTextBox controls cover and hide the Column Headers of the Grid.

I'm using RadControls for WinForms Q1 2010 SP2.
As attachment "scroll.JPG" shows what happens.

Could you please help me ? Many thanks in advance
Stefano

The entire source code is:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }
 
    private void Form1_Load(object sender, EventArgs e)
    {
        DataTable dtGrid = new DataTable();
        dtGrid.Columns.Add("COL1", typeof(string));
        dtGrid.Columns.Add("COL2", typeof(string));
 
        for (int j = 0; j < 20; j++)
        {
            dtGrid.Rows.Add("val_0", "val_1");
        }
        radGridView1.DataSource = dtGrid;
 
    }
 
 
    void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
    {
        if (e.CellType == typeof(GridDataCellElement) && e.Row is GridDataRowElement)
        {
            e.CellType = typeof(MyCell);
        }
    }
 
}
 
 
public class MyCell : GridDataCellElement
{
    private RadHostItem _RadHostItem;
    private RadTextBox _RadTextBox;
 
 
    public MyCell(GridViewColumn column, GridRowElement row)
        : base(column, row)
    {
    }
 
    protected override void CreateChildElements()
    {
        base.CreateChildElements();
 
        _RadTextBox = new RadTextBox();
        _RadTextBox.Name = "_RadTextBox";
        _RadHostItem = new RadHostItem(_RadTextBox);
 
        Children.Add(_RadHostItem);
 
    }
 
    public override void SetContent()
    {
        _RadTextBox.Text = "flower";
    }
 
    protected override SizeF ArrangeOverride(SizeF finalSize)
    {
 
        SizeF size = base.ArrangeOverride(finalSize);
 
        float width = size.Width;
        float height = size.Height;
 
        _RadHostItem.Arrange(new RectangleF(1f, 1f, width - 1f, height - 1f));
 
        return size;
    }
 
}





​
Stefano
Top achievements
Rank 1
 answered on 22 Jan 2015
1 answer
990 views
Hi,

i have a SplitContainer with 3 SplitPanels.

Between the first and second, there mustn't be a Splitter,
Between the second and the third, there must be a Splitter.

I tried to Set Splitter width to 4 for the SplitContainer in the Designer and then get the Splitters programmatically fom the Container and set the first Splitter to SplitterWidth = 0, but the Splitters Property of the Container is Empty.

Any suggestions here.

Regards,
Florian Keller
Ralitsa
Telerik team
 answered on 22 Jan 2015
1 answer
336 views
I am creating radScheduler resources by creating a EventId where the key is an employee number.  Like this:

resource.Id = new EventId([Emp#])

I later need to add an appointment to radScheduler and assign it to the resource who's Id is that of the EventId([Emp#]).

How can I get the ResourceId from the collection where the EventId Key that the resource was created with equals [Emp#]?

Thank you.
Hristo
Telerik team
 answered on 21 Jan 2015
3 answers
171 views
Hi everybody,
How to print Appointments with localization, specifically the Calendar at the title.
thanks in advance,
Best regards.
Nuno
Top achievements
Rank 2
 answered on 21 Jan 2015
8 answers
199 views
Please, I need a Help
This is my situation, I need to clone data through two RadPivotgrids, Pivotgrid 1 has data  I need, and I need that the pivotgrid 2 has the same data including the group conditions and filters in real time. Is it posible?




My version: 2014.3.1104.40

Dimitar
Telerik team
 answered on 21 Jan 2015
2 answers
147 views
radGridView for WinForms 2010 Q1,  thanks very much!
Todor
Telerik team
 answered on 21 Jan 2015
1 answer
576 views
Is it possible to set the trackbar to an negative value for its min and a positive value for his max. What i want to do is have the thumb of the trackbar be position at the center when i slide it left it becomes negative and when i slide it right it become positive.
Ralitsa
Telerik team
 answered on 21 Jan 2015
3 answers
673 views
I have a problem about backcolor. I want to change the backcolor of a specific row.

I want to select with a Click or DoubleClick the row and its have to backcolor change.
Any ideas guys?, becauses i tryied a lot of things but doesnt works because the only condicion is that, "Selected" or at least the "CurrentRow", but i need in click or doubleclick event.

Thank you guys.
Hristo
Telerik team
 answered on 21 Jan 2015
3 answers
203 views
Hello telerik
I have a gridview and add it a column like this

GridViewDecimalColumn dec = new GridViewDecimalColumn();
            dec.FieldName = "Flaot";
            dec.Name = "Float";
            dec.HeaderText = "Float";
            dec.DataType = typeof(decimal);
            dec.FormatString = "{0:#,0.########}";
            dec.ShowUpDownButtons = false;
            dec.DecimalPlaces = 8;
            radGridView1.Columns.Add(dec);
I didint want to see UpDownButton so I set  ShowUpDownButtons  =false , in edit mode The ShowUpDownButtons doesnt shown but when I use Up or Down button
it increase and Decrease the value of cell.Is there any way to stop this behavior.(I am using the version 2014-1-226)
I am Waiting eagerly for your response.
Hristo
Telerik team
 answered on 21 Jan 2015
1 answer
125 views
Take any RadMenu and put a RadMenuItem on it.
Select the RadMenuItem and change the Image property to any resource image (either import a new one or select an existing one.)
The form looks and acts and works correctly but...If you look at the Image property, the name is NOT the name of the selected resource.  Instead its a Base-64 Char array...

So the Property window doesnt tell you what resource was selected.

Is there any way to correct this?  Any help would be appreciated!

-Curtis
Dimitar
Telerik team
 answered on 21 Jan 2015
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?