Telerik Forums
UI for WinForms Forum
1 answer
125 views

Hi Telerik,

Is this Marked Zones Chart available in “2011.2 11.831 (Aug 31, 2011)” version of Windows forms

Regards

Vinodh

Missing User
 answered on 23 Nov 2012
4 answers
529 views
Hi,

  I want to know how to open drop down for Rad Multi - Column combo box even after  lost focus from multi-column combo box  i..e multi-column combo box leave event.

Thanks & Regards,
Surya.
Surya
Top achievements
Rank 1
 answered on 23 Nov 2012
4 answers
132 views
Hi,


Is there a way to restrict a RadTreeNode selection zone? In other words, I want to select/highlight a node only when the mouse is over the tree node name, and then not being able to select/highlight a node when the mouse is located in a blank space.


Regards.
Nathalie
Top achievements
Rank 1
 answered on 23 Nov 2012
1 answer
317 views
Hey there,

I am having troubles rerendering/reloading/reimporting the fixed/preferred width of a table within the RichTextBox:

Here is how I insert my table:

var table = new Table
                        {
                            Borders = new TableBorders(new Border(1, Telerik.WinControls.RichTextBox.Model.BorderStyle.Single, Color.Black)),
                            LayoutMode = TableLayoutMode.Fixed,
                            PreferredWidth = new TableWidthUnit(200) 
                                              
                        };
 
            for (int i = 0; i < 2; i++)
            {
                var row = new TableRow();
 
                for (int j = 0; j < 2; j++)
                {
                    var cell = new TableCell
                    {
                        Background = Color.White,
                        Padding = new Padding(3)
                    };
 
                    var paragraph = new Paragraph();
                    var span = new Span { Text = "c"+ i + j };
 
                    paragraph.Inlines.Add(span);
                    cell.Blocks.Add(paragraph);
                    row.Cells.Add(cell);
                }
 
                table.Rows.Add(row);
            }
            this.richTextBox.InsertTable(table);


This works fine. The RichTextBox control inserts the table with the preferred width. The HTML code it creates after exporting is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Untitled</title>
      <style type="text/css">  .p_384D933F { margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }   .s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; }   .p_CC664AAA { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }   .tbl_77AF2C2D { border-collapse: collapse;table-layout: fixed;width: 200px; }   .tc_C0034B80 { border-left: 1px solid #000000;border-top: 1px solid #000000;border-right: 1px solid #000000;border-bottom: 1px solid #000000;padding: 3px 3px 3px 3px;background-color: #FFFFFF;vertical-align: top; }   </style>
   </head>
   <body>
      <p class="p_384D933F"><span class="s_6BF1D20F"> </span></p>
      <table class="tbl_77AF2C2D">
         <tr>
            <td class="tc_C0034B80" align="left" valign="top">
               <p class="p_CC664AAA"><span class="s_6BF1D20F">c00</span></p>
            </td>
            <td class="tc_C0034B80" align="left" valign="top">
               <p class="p_CC664AAA"><span class="s_6BF1D20F">c01</span></p>
            </td>
         </tr>
         <tr>
            <td class="tc_C0034B80" align="left" valign="top">
               <p class="p_CC664AAA"><span class="s_6BF1D20F">c10</span></p>
            </td>
            <td class="tc_C0034B80" align="left" valign="top">
               <p class="p_CC664AAA"><span class="s_6BF1D20F">c11</span></p>
            </td>
         </tr>
      </table>
      <p class="p_384D933F"><span class="s_6BF1D20F"> </span></p>
   </body>
</html>

Rendering it in any browser also works fine. The table's width is still 200.

However, if I try to import that HTML into the RichTextBox control again:

IDocumentFormatProvider provider = new HtmlFormatProvider();
           Byte[] convertedText = Encoding.ASCII.GetBytes(htmlStream);
           RadDocument document = provider.Import(convertedText);
           richTextBox.Document = document;

The RichTextBox control renders the table with auto-fit style, means the table's fixed width 200 renders incorrectly.

Am I doing anything wrong in the import call or is this a bug in the control?

Thanks,
Jean


Svett
Telerik team
 answered on 23 Nov 2012
3 answers
464 views
Requirements
RadControls version 2012.2.912.40
.NET version 4.0
Visual Studio version 2010
programming language VB.Net
  
PROJECT DESCRIPTION
I tried to reproduce the demo sample that generates the Check-box in the drop-down list.  In the Demo applications it is called
Dropdown & List/Creating New Items

The VB.Net code seems to be a missing event details as there are no handles int he code to copy for the events below
Private Sub ItemDataBound(ByVal sender As Object, ByVal args As ListItemDataBoundEventArgs)
Private Sub ItemDataBinding(ByVal sender As Object, ByVal args As ListItemDataBindingEventArgs)  
Private Sub CreatingVisualListItem(ByVal sender As Object, ByVal args As CreatingVisualListItemEventArgs)
I added some handles, but dont seem to get the Dropdown to generate properly

Private Sub ItemDataBound(ByVal sender As Object, ByVal args As ListItemDataBoundEventArgs) Handles RadDropDownList1.ItemDataBound, RadListControl1.ItemDataBound
Private Sub ItemDataBinding(ByVal sender As Object, ByVal args As ListItemDataBindingEventArgs) Handles RadDropDownList1.ItemDataBinding
Private Sub CreatingVisualListItem(ByVal sender As Object, ByVal args As CreatingVisualListItemEventArgs) Handles RadListControl1.CreatingVisualListItem

I tried to modify the code but could not get  the the  check-box in the drop-down item ,while it does in the List-box

There seems to be a missing event, and in the demo code?

Thanks 

Denis
Ivan Todorov
Telerik team
 answered on 23 Nov 2012
3 answers
242 views
Hi,

I recently got the below exception, couldn't reproduce it again.
Any idea on this,

:Error At: radpageview1_SelectedPageChanging
 | System.OutOfMemoryException | Exception of type 'System.OutOfMemoryException' was thrown. | mscorlib |    at System.Collections.Generic.Dictionary`2.Initialize(Int32 capacity)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Telerik.WinControls.RadPropertyValueCollection.GetEntry(RadProperty prop, Boolean createNew)
   at Telerik.WinControls.RadElement.set_ShouldPaint(Boolean value)
   at Telerik.WinControls.Primitives.FillPrimitive.InitializeFields()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.UI.ScrollBarButton.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.RadItem..ctor()
   at Telerik.WinControls.UI.ScrollBarButton..ctor(ScrollButtonDirection direction)
   at Telerik.WinControls.UI.RadScrollBarElement.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.RadItem..ctor()
   at Telerik.WinControls.UI.RadScrollBarElement..ctor()
   at Telerik.WinControls.UI.RadScrollLayoutPanel.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.UI.RadScrollLayoutPanel..ctor()
   at Telerik.WinControls.UI.RadScrollViewer.CreateScrollLayoutPanel()
   at Telerik.WinControls.UI.RadScrollViewer.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.RadItem..ctor()
   at Telerik.WinControls.UI.RadScrollViewer..ctor()
   at Telerik.WinControls.UI.RadDropDownMenuElement.CreateChildElements()
   at Telerik.WinControls.RadElement.CallCreateChildElements()
   at Telerik.WinControls.RadElement.Construct()
   at Telerik.WinControls.RadElement..ctor()
   at Telerik.WinControls.UI.RadDropDownMenu.CreatePopupElement()
   at Telerik.WinControls.UI.RadDropDownMenu.InitializeChildren()
   at Telerik.WinControls.UI.RadDropDownMenu..ctor(RadElement ownerElement, RadDropDownMenu parentPanel)
   at Telerik.WinControls.UI.RadDropDownMenu..ctor()
   at Telerik.WinControls.UI.RadContextMenuDropDown..ctor()
   at Telerik.WinControls.UI.RadContextMenu..ctor(IContainer owner)
   at Telerik.WinControls.UI.RadContextMenu..ctor()
   at Telerik.WinControls.UI.RadMaskedEditBoxElement..ctor()
   at Telerik.WinControls.UI.RadMaskedEditBox.CreateChildItems(RadElement parent)
   at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CreateChildItems(RadElement parent)
   at Telerik.WinControls.RadControl.ComponentOverrideElementTree.CreateChildItems(RadElement parent)
   at Telerik.WinControls.RadControl.Construct()
   at Telerik.WinControls.RadControl..ctor()
   at Telerik.WinControls.UI.RadMaskedEditBox..ctor()
   at Form1.InitializeComponent()
Boryana
Telerik team
 answered on 23 Nov 2012
9 answers
331 views
I can't seem to get the RadChart into a VS2010 toolbox. I'm using Q1 2010 SP2, and Q2 2010 Beta Winform controls in a .net 4 project.
Boryana
Telerik team
 answered on 23 Nov 2012
2 answers
106 views
Hi,
I'm trying to save last position of the tile element after I do drag and drop, but I cannot seems to find what event fired after I drop the RadTileElement in new position. I have tried using the mouseUp event, but it seems the MouseUp event doesn't fired when you do a drag drop.
Any suggestions what event fired after a drag drop in RadTileElement

Thanks,
Sendy
sendy
Top achievements
Rank 1
 answered on 23 Nov 2012
0 answers
85 views
Hi,
How to allow only C and D letters to be written int the third column of the radGridView. And prevent the user to type any other letters or characters??

Thankfully Yours.
Fadi
Top achievements
Rank 1
 asked on 23 Nov 2012
0 answers
85 views
Hi Telerik, 
I got a Radgrid in my project, when i load the data i used Cell Formatting to give some colors by this way.


private void PrimaryRadGridView_CellFormatting(object sender, CellFormattingEventArgs e)
        {
 
            if (e.CellElement.ColumnInfo.FieldName == "ID")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                e.CellElement.BackColor = Color.LightSlateGray;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
 
            if (e.CellElement.ColumnInfo.FieldName == "Type")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                e.CellElement.BackColor = Color.LightSlateGray;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
            if (e.CellElement.ColumnInfo.FieldName == "BBor")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                //e.CellElement.ForeColor = Color.Red;
                e.CellElement.BackColor = Color.LightGoldenrodYellow;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
            if (e.CellElement.ColumnInfo.FieldName == "EBor")
            {
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                e.CellElement.ForeColor = Color.Red;
                e.CellElement.BackColor = Color.LightGoldenrodYellow;
                e.CellElement.GradientStyle = GradientStyles.Linear;
            }
            if (e.CellElement.Value != null && e.CellElement.Value.ToString() == "PE0")
            {
                e.Row.Cells[4].ReadOnly = true;
                e.Row.Cells[4].Value = "XXXXXXXXXX";
                e.Row.Cells[4].Style.BackColor = Color.DarkRed;
                e.Row.Cells[4].Style.CustomizeFill = true;
            }
 
            
 
        }

Then I'm using to validate the cells and to change Fore & back color after the validation, but the color is not changing.
Cell Validated code:

private void PrimaryRadGridView_CellValidated(object sender, CellValidatedEventArgs e)
        {
 
 
            if (e.ColumnIndex != 3)
                return;
            if (e.RowIndex != -1)
            {
                int nextRowIndex = e.RowIndex + 1;
                int lastRowIndex = PrimaryRadGridView.Rows.Count - 1;
                if (nextRowIndex <= lastRowIndex)
                {
 
 
                    var value = PrimaryRadGridView.Rows[e.RowIndex].Cells[3].Value.ToString();
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Value = value;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].ReadOnly = true;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.ForeColor = Color.Blue;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.BackColor = Color.GreenYellow;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.CustomizeFill = true;
 
                    PrimaryRadGridView.ClearSelection();
 
                    PrimaryRadGridView.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.CellSelect;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[3].BeginEdit();
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[2].Style.ForeColor = Color.Blue;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[3].Style.BackColor = Color.GreenYellow;
                    PrimaryRadGridView.Rows[nextRowIndex].Cells[3].Style.CustomizeFill = true;
 
 
                }
            }
             
        }

When i put a break point at both cell formatting & cell validated both are clashing each other. How ca i fix this  problem, please help me.
Karthik
Top achievements
Rank 1
 asked on 22 Nov 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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?