Telerik Forums
UI for WinForms Forum
3 answers
325 views
Hi,

This is a bit strange, but I cannot get the radCalendar special days to work when adding them from code. The special days just doesn't show up on the calendar. What I want is for them just to be Bolded or marked like when they are added in design time, so nothing fancy.

I have tried the example project from this post: http://www.telerik.com/community/forums/winforms/calendar-and-datetimepicker/calendar-specialdays.aspx and a bunch of other stuff, but nothing seems to work. Adding them in design time makes them show up just fine though.

Any help is appreciated

/Daniel
Ivan Petrov
Telerik team
 answered on 22 Jun 2012
1 answer
236 views
Hello,

After sticking a while how to use themes dynamicly we found a simple solution, don't imaging why the ThemeResolutionService not instances the required theme.

ThemeResolutionService provides several methods to register a theme so we ware expecting he loads also the theme and instances it if required by setting ApplicationThemeName. It doesn't do so.

Our solution is quiet simple. Take a Dictionary<string, RadThemeComponentBase> in class being alive the whole time your application runes (static class or like us in the AddIn class). If a theme is required so check your dictionary if theme is loaded otherwise create object (f.i. with Activator.CreateInstance<...>()) and add it to the dictionary. Now the theme is alive and each change on ThemeResolutionService.ApplicationThemeName uses the living theme.

private void AddinModule_OfficeColorSchemeChanged(object sender,
                                     OfficeColorScheme theme)
{
  string themeName = string.Format("Office2010{0}",
                          theme);
 
  if (!this.themes.ContainsKey(themeName))
  {
     switch (theme)
    {
      case OfficeColorScheme.Black:
        this.themes.Add(themeName,
                    Activator.CreateInstance<Office2010BlackTheme>());
        break;
 
      case OfficeColorScheme.Blue:
        this.themes.Add(themeName,
                    Activator.CreateInstance<Office2010BlueTheme>());
        break;
 
      case OfficeColorScheme.Silver:
        this.themes.Add(themeName,
                    Activator.CreateInstance<Office2010SilverTheme>());
        break;
    }
  }
 
  ThemeResolutionService.ApplicationThemeName = themeName;
}

Hope it helps others


Regards from Leipzig

Holger Boskugel
Jack
Telerik team
 answered on 22 Jun 2012
5 answers
450 views

[Completely new with Telerik]
Hi

I have a Category column in Employee Table as of type GridViewComboBoxColumn and i have assigned a datasource to it.  
The values of this column can be "Male" or "Female". The datasouce contains these two values.

While adding new record I want to pick up 1st available value in datasource as default selected.

How can i do this?

 

Regards

Raghu.

Bob
Top achievements
Rank 2
 answered on 21 Jun 2012
1 answer
158 views
Hi,
I have a grid view with a GridViewComboBoxColumn and a GridViewMultiComboBoxColumn . GridViewMultiComboBoxColumn's datasource depends on GridViewComboBoxColumn selected value. If GridViewComboBoxColumn value is 1.Bind Model1 to the GridViewMultiComboBoxColumn column , value is 2 there is no datasouce in multicombo and this time user manual add data in multicombo.
Is it possible. Please help me how to solve. Thank you so much,
Nikolay
Telerik team
 answered on 21 Jun 2012
5 answers
222 views
Hi,

Ive incorperated your carousel into my application but im having some trouble. Based upon the user clicking a movie from the listview i generate and index in which i wish to use to bring the correct poster to the front of the carousel.

which methods should i be looking at for this?

i just want the carousel to move into the correct position just like when the user clicks on any other visible item.

Regards
Kevin
Peter
Telerik team
 answered on 21 Jun 2012
1 answer
274 views
i develop C# application on VS2010
i use gridview verion 2011-1-11-419
the grid is very slow in form loading for the first time i call the form , it takes 4 seconds with an empty code form
but after the form is loaded and reopen the form it take approx zero seconds
note : if i make a new project with new form and i just dragdrop a new grid in the form then run the application  the problem will be occured

what to do?

thank you
Jack
Telerik team
 answered on 20 Jun 2012
5 answers
575 views

Requirements

RadControls version

 

.NET version

 

Visual Studio version

 

programming language

 

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION                                    
Hi, im new to Rad controls and im developing an app that implements your RadCarosel.

I was adding images / items to the carosel and it works great.The problem i have is, the carosel has a hold on the image which lock me out of modifying the image with another command
eg i have an array of posters that i assign to the carosel, i then have another function that will change the size of the image. Theres a lock/ handle holding the image in memory and i dont know how to dispose if it correctly. I thought it might have been eary to .dispose of all the images in the carosel and reload it when i have finished making changes but this has proved difficult!!

Vb.Net Code

RadCarousel1.VisibleItemCount = 7

 

 

 

 

 

 

Dim i As Integer = 0

 

While i < directorylist.Count

 

Try

 

 

Dim image2 As New RadImageItem

image2.Image =

 

Image.FromFile(directorylist(i) + "\folder.jpg")

 

RadCarousel1.Items.Add(image2)

 

 

Catch ex As Exception

 

 

End Try

Any ideas on how to assign an image to a carosel and then dispose of the image correctly when i need to?

Very limited threads on this control and the documentation is very vague!

Thanks for any help :)

Peter
Telerik team
 answered on 20 Jun 2012
2 answers
1.8K+ views
Hello everyone,

i need to know how i can select the whole text in a RichTextBox by code-behind.

My target is to apply a default font size and font family to the content of the RichTextBox, but ChangeFontSize() and ChangeFontFamily() only applys to selected text and has no effect if there is no selected text. And i can't find any other possibility to set the size and family.

Or does anyone have another solution for applying the styles to the content of the RichTextBox ?

Kind Regards,
Michael
Michael Hilgers
Top achievements
Rank 1
 answered on 20 Jun 2012
4 answers
428 views
I exported HTML from the RadRichTextBox as a fragment and then later tried to import this fragment back into a new RadRichTextBox.  It blows up with a null reference exception when I try to import it back in.  It worked with no errors when I used the default export options. Are fragments not possible to round trip with RadRichTextBox?

HtmlFormatProvider prov = new HtmlFormatProvider();
prov.ExportSettings = new HtmlExportSettings()
    {
        DocumentExportLevel = DocumentExportLevel.Fragment,
        StylesExportMode = StylesExportMode.Inline
    };
string data = prov.Export( _editor.Document );
 
// later...
 
HtmlFormatProvider prov2 = new HtmlFormatProvider();
_editor.Document = prov2.Import( data );    // this line gets the null reference exception at the location below


   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ConvertToFontStyle(Object value)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.CreateSpanFromTextNode(INode childNode)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessContentNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.<>c__DisplayClass3.<ProcessNode>b__2()
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessGenericNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.<>c__DisplayClass3.<ProcessNode>b__2()
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessParagraphNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.<>c__DisplayClass3.<ProcessNode>b__2()
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessGenericNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.<>c__DisplayClass3.<ProcessNode>b__2()
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.Import.HtmlDocumentImporter.Import(Stream input)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.HtmlFormatProvider.Import(Stream input)
   at Telerik.WinControls.RichTextBox.FileFormats.Html.HtmlFormatProvider.Import(String input)
   at Documents._list_SelectedValueChanged(Object sender, EventArgs e) in DocumentsTab.cs:line 99

Fragment contents:
<p style="margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;">
    <span style="font-family: 'Arial';font-style: ;font-weight: bold;font-size: 13.33333px;color: #000000;text-decoration: underline;">High return net</span>
</p>
<p style="margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;">
    <span style="font-family: 'Arial';font-style: ;font-weight: bold;font-size: 13.33333px;color: #000000;text-decoration: underline;">High return gross</span>
</p>
<p style="margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;">
    <span style="font-family: 'Arial';font-style: normal;font-size: 13.33333px;color: #000000;">See handbook page 128</span>
</p>
Michael Hilgers
Top achievements
Rank 1
 answered on 20 Jun 2012
1 answer
110 views
I use this code but I dont' work. Please help me.
// Add data into gridview multicolumnbobox

bool isColumnAdded = false;
bool isColumnAdded1 = false;
void radGridViewDetail_CellBeginEdit(object sender, EventArgs e)
        {
            GridViewEditManager edit = (GridViewEditManager)sender;
             
            GridViewColumn data = edit.GridViewElement.CurrentColumn;
            //MessageBox.Show(data.Index.ToString());
            if (data.Index == 1)
            {
                if (this.radGridViewDetail.CurrentColumn is GridViewMultiComboBoxColumn && data.Index == 1)
                {
                    if (isColumnAdded == false)
                    {
                        isColumnAdded = true;
                        RadMultiColumnComboBoxElement editor = (RadMultiColumnComboBoxElement)this.radGridViewDetail.ActiveEditor;
                        editor.EditorControl.MasterTemplate.AutoGenerateColumns = false;
                        editor.EditorControl.Columns.Clear();
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("strProductID"));
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("memDescription"));
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("dblUnitsInStock"));
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("dblUnitsAllocated"));
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("curSalesPrice"));
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("strWarehouseID"));
                        editor.EditorControl.Columns[0].HeaderText = "Item No";
                        editor.EditorControl.Columns[1].HeaderText = "Description";
                        editor.EditorControl.Columns[2].HeaderText = "Stock";
                        editor.EditorControl.Columns[3].HeaderText = "Available";
                        editor.EditorControl.Columns[4].HeaderText = "Price";
                        editor.EditorControl.Columns[5].HeaderText = "Warehouse";
                        editor.AutoSizeDropDownToBestFit = true;
                        //if (editor.EditorControl.Columns.Count == 8)
                        //{
                        //    editor.EditorControl.Columns.RemoveAt(7);
                        //    editor.EditorControl.Columns.Remove("strNotes");
                        //}
                    }
                }
            }
            if (data.Index == 2)
            {
                if (this.radGridViewDetail.CurrentColumn is GridViewMultiComboBoxColumn &&  data.Index == 2)
                {
                    if (isColumnAdded1 == false)
                    {
                        isColumnAdded1 = true;
                        RadMultiColumnComboBoxElement editor = (RadMultiColumnComboBoxElement)this.radGridViewDetail.ActiveEditor;
                        editor.EditorControl.MasterTemplate.AutoGenerateColumns = false;
                        editor.EditorControl.Columns.Clear();
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("strWarehouseID"));
                        editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("strNotes"));
                        editor.EditorControl.Columns[0].HeaderText = "Warehouse ID";
                        editor.EditorControl.Columns[1].HeaderText = "Notes";
                        editor.AutoSizeDropDownToBestFit = true;  
                    }
                }
            }
 
 
        }
Stefan
Telerik team
 answered on 19 Jun 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?