Telerik Forums
UI for WinForms Forum
9 answers
487 views

In winforms, this attribute is shown in gray.

How to see it in a radpropertygrid?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Jan 2018
6 answers
444 views
I have a form with multiple rich text editors, all with custom spell checking.
I did have this code to set the spell checker:
System.InvalidOperationExceptionvar culture = CultureInfo.GetCultureInfo("en-AU");
var checker = (DocumentSpellChecker)radRichTextEditor1.SpellChecker;
if (!(checker.GetDictionary(culture) is AustralianDictionary))
{
  checker.AddDictionary(AustralianDictionary.Instance, culture);
}
radRichTextEditor1.SpellChecker.SpellCheckingCulture = culture;

However, I found that I was using hundreds of megabytes of memory.
The work-around I used was to create a custom document spell checker:
public class CustomDocumentSpellChecker : DocumentSpellChecker
{
 
    // Thread-safe thanks to the CLR
    private static readonly CustomDocumentSpellChecker _instance = new CustomDocumentSpellChecker();
 
    private CustomDocumentSpellChecker()
    {
        var culture = CultureInfo.GetCultureInfo("en-AU");
        AddDictionary(AustralianDictionary.Instance, culture);
        SpellCheckingCulture = culture;
    }
 
    public static CustomDocumentSpellChecker Instance
    {
        get
        {
            return _instance;
        }
    }
}

I then assigned the custom spell checker to the rich text editor:
radRichTextEditor1.SpellChecker = CustomDocumentSpellChecker.Instance;

I'm hoping this approach is reasonable, and that the spell checker won't have a problem with being assigned to multiple rich text editors.
daniel
Top achievements
Rank 1
 answered on 04 Jan 2018
2 answers
433 views

Hello all 

i have the problem about custom filtering ... 

why custom filtering in gridview is very slowly 

this the code i write 

 Imports System.Data.SqlClient

Public Class Form1
    Dim conn As SqlConnection
    Dim da As SqlDataAdapter
    Dim ds As DataSet

    Dim str As String = "Server=CHIP-PC;Initial Catalog=Kebun;uid=sa;pwd=351980"

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Using conn As New SqlConnection(str)

            conn.Open()

            da = New SqlDataAdapter("SELECT * FROM MstPekerja", conn)
            ds = New DataSet
            ds.Clear()
            da.Fill(ds, "TrPekerja")
            RadGridView1.DataSource = (ds.Tables("TrPekerja"))

            conn.Close()
        End Using
    End Sub
    Private Sub RadGridview1_CustomFiltering(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCustomFilteringEventArgs) Handles RadGridView1.CustomFiltering
        If String.IsNullOrEmpty(Me.RadTextBox1.Text) Then
            e.Visible = True
            For i As Integer = 0 To Me.RadGridView1.ColumnCount - 1
                e.Row.Cells(i).Style.Reset()
                e.Row.InvalidateRow()
            Next i
            Return
        End If
        e.Visible = False
        For i As Integer = 0 To Me.RadGridView1.ColumnCount - 1
            Dim text As String = e.Row.Cells(i).Value.ToString()
            If text.IndexOf(Me.RadTextBox1.Text, 0, StringComparison.InvariantCultureIgnoreCase) >= 0 Then
                e.Visible = True
                e.Row.Cells(i).Style.CustomizeFill = True
                e.Row.Cells(i).Style.DrawFill = True
                e.Row.Cells(i).Style.BackColor = Color.FromArgb(201, 252, 254)
            Else
                e.Row.Cells(i).Style.Reset()
                e.Row.InvalidateRow()
            End If
        Next i
    End Sub

    Private Sub RadTextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles RadTextBox1.TextChanged
        Me.RadGridView1.MasterTemplate.Refresh()
    End Sub
End Class

i just set enablecustomfiltering = true 

enable filtering = true 

 

 the data only 726 rows .... 

 

Thanks n best regards 

 

Hengky 

 

 

Dimitar
Telerik team
 answered on 04 Jan 2018
8 answers
1.0K+ views

How do you specify a default value for a Color property using the [DefaultValue()] attribute?

if I write

        [DefaultValue(typeof(Color), "Gray")]
        [DefaultValue(typeof(Color), "0x808080")]

it does not work correctly


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Jan 2018
5 answers
741 views
Hi,

Is it possible to set a PropertyGridTextBoxEditor to be multiline?

I have tried the following approach, but although the Multiline property does successfully get set to true, the textbox does not display as such.

 

 

private void detailsPropertyGrid_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
        {
            switch (e.Item.Name)
            {
                case "Details":
                    PropertyGridTextBoxEditor editor = e.Editor as PropertyGridTextBoxEditor;
                    editor.Multiline = true;
                    break;
                default:
                    return;
            }
        }

Thanks,

Chris.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Jan 2018
1 answer
115 views
When I'm typing in the rich text editor, there is no space between the last letter I've typed and the flashing vertical bar that indicates where the next letter will be typed. Our clients have complained that this makes it difficult to see what they're typing. A lot of other text editors have a very small horizontal space between the last letter that's been typed and the flashing vertical bar. Is there any way I can add a small space in between?
Hristo
Telerik team
 answered on 03 Jan 2018
7 answers
532 views

Hello.

I am quite new to UI programming (and Telerik components) and thus have a question about double clicking. The problem is as follows.
We have a need to start some handling when user double clicks on an item. This should happen from either side of the gantt view, from the grid or timeline side.
My current implementation is such that I subscribe for radGanttView DoubleClick-event. In the event handler I check from radGanttView SelectedItem-property which item was double clicked. The problem here is that if the item is already selected, user can double click anywhere and my code will be run.
So the question is as follows. Is there a way to receive a double click only if user clicks on the UI element of the task? It seems that GanttGraphicalViewBaseTaskElement has a doubleclick-event but I don't know how to get my hands on such object. Or should this be done somehow differently?

Thank you!
br.Pasi

Using:
Progress 11.6
Telerik UI for Winforms R2 2017

Pasi
Top achievements
Rank 1
 answered on 03 Jan 2018
4 answers
602 views

Hi

I am converting my application from FlashBuilder to a c# Winform and I would like  as shown in the attached gif. Essentially I have an image for the non-selected , one for the hover and one for the selection (a different colour depending on what level was selected).

 

thanks in advance.

Hristo
Telerik team
 answered on 03 Jan 2018
2 answers
122 views

Hi

I have several projects in the same solution (i.e clients, files, etc) and there are forms in all the projects with a main form as mdi parent in the "Main" project.

Now I'm having problems opening forms in other projects through the frmMain.formOpen procedure as I can't reference frmMain when frmMain is referencing frmClient (for example...otherwise I get cyclic referencing).

I want to be able to click a link on frmClient (in Client Project) which is a mdi child of frmMain (in Main project)  and open an mdi child (in frmMain) of frmComments which is in the Client project as well.

The Main project references the Client project so I can get a handle on the form in Client but now I can't get a handle on  the frmMain to run openform procedure on it to open the frmComment

 

Any suggestions how I could approach this (interface, event??)

 

Tried

Activator.CreateInstance(GetNamespace(frmName), frmName) as RadForm but the error is Could not load type 'formName' from assembly

Dimitar
Telerik team
 answered on 03 Jan 2018
3 answers
863 views
I am trying to export a GridView in WinForms to Excel. One column I have formatted in the GridView as Percent, however when I am exporting to Excel, I don't see how I can format a specific column as Percent.
Brian
Top achievements
Rank 1
Iron
Iron
 answered on 02 Jan 2018
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?