Telerik Forums
UI for WinForms Forum
3 answers
117 views
Hi Team,

When doing some research on radmaskedittextbox(DateFormat)  i observed the following things.

1.By default maskedittextbox is allowing user to select only date between 1st of current month and
current date.

2.it is not allowing back date and also future date.

3.I am not able to clear the default date of radmaskedittextbox(DateFormat)  in runtime.

but in my application i want to allow back date and also future date.please tell me how to achieve this.

My Code snippet:
 private void rcStartDate_SelectionChanged(object sender, EventArgs e)
        {        
            rmebStartDate.Clear();
            rmebStartDate.Text = "";
            rmebEndDate.Value = "";
            
            rmebStartDate.Text = rcStartDate.SelectedDate.ToShortDateString().ToString();
            rcStartDate.Visible = false;
        }


Thanks
Ulaga
Peter
Telerik team
 answered on 28 Sep 2011
3 answers
620 views
Dear Telerik team,
                              I am designing a style for CheckBox control and the problem i face is "I cannot find property to change CheckMark color and backColor of the box for check mark. The property i guess would have worked is "RadCheckBoxElement.ToggleState=Ok.Pressed. But this property produces arrows etc ( for whatever shape i choose from available options)

none of the property changes the dark brown color of check and the box.

Thanks
Nikolay
Telerik team
 answered on 28 Sep 2011
2 answers
334 views
Hi all,
I've a problem with HTMLFormatProvider and font-style.
I'm using a radRichTextBox with richRibbonBar (but the problem is also present with a button that execute radRichTextBox1.toggleItalic() ). For example, I have write the string "foofoofoo" in italic inside radRichTextBox and then, using HTMLFormatProvider, I've got the text associated to the document. 

This is the ExportToHTML function

public string ExportToHTML(RadDocument document)
        {
            HtmlFormatProvider provider = new HtmlFormatProvider();
            return provider.Export(document);            
        }


This is the string returned:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
.p_4451D050 { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
.s_C54C634B { font-family: 'Calibri';font-style: System.Collections.Specialized.StringCollection;font-size: 16px;color: #000000; } 
</style></head><body><p class="p_4451D050"><span class="s_C54C634B">foofoofoo</span></p></body></html>


There is a problem in font-style settings of css class, because it doesn't write "italic" but "System.Collections....".
So, when I send a html-email in this format I lost this font setting..

I've tried with XamlFormatProvider and italic (as fontweight) is correct.

Thanks a lot for your help
Keiichi-kun
Top achievements
Rank 1
 answered on 27 Sep 2011
2 answers
305 views
After searching the forums for some time (days, well 2 days) I finally have a solution on displaying an Error Icon in a cell of a RADGridView i.e. like in SQL Management Studio when a certain criteria is met.
Scenario 1: Validate all cells in a row simultaneously
Scenario 2: Validate an individual cell

So here goes:
Solution 1: Validate all cells in a row simultaneously
Private Sub rgvSrcExtractFiles_RowValidating(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.RowValidatingEventArgs) Handles rgvSrcExtractFiles.RowValidating
    If TypeOf e.Row Is GridViewDataRowInfo Then
        For Each cell As GridViewCellInfo In e.Row.Cells
            Select Case cell.ColumnInfo.Name
                Case "FileDirectory"
                    If Not FileAcc.DirectoryExists(cell.Value) Then
                        cell.ErrorText = "Directory not found!"
                    ElseIf FileAcc.CountFilePrefixWithExt(cell.Value, e.Row.Cells("FilePrefix").Value, e.Row.Cells("FileExtension").Value) = 0 Then
                        cell.ErrorText = "No valid files found in directory!"
                    Else
                        cell.ErrorText = String.Empty
                    End If
                Case "FilePrefix"
                    If FileAcc.CountFilePrefix(e.Row.Cells("FileDirectory").Value, cell.Value) = 0 Then
                        cell.ErrorText = "Files not found!"
                    Else
                        cell.ErrorText = String.Empty
                    End If
                Case "FileExtension"
                    If FileAcc.CountFileExt(e.Row.Cells("FileDirectory").Value, cell.Value) = 0 Then
                        cell.ErrorText = "Files not found!"
                    Else
                        cell.ErrorText = String.Empty
                    End If
            End Select
        Next
    End If
End Sub



Solution 2: Validate an individual cell

Private Sub rgvSrcExtractFiles_CellValidating(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.CellValidatingEventArgs)  Handles rgvSrcExtractFiles.CellValidating
    Dim column As GridViewDataColumn = TryCast(e.Column, GridViewDataColumn)
    If TypeOf e.Row Is GridViewDataRowInfo AndAlso column IsNot Nothing Then
        Select Case column.Name
            Case "FileDirectory"
                If Not FileAcc.DirectoryExists(e.Value) Then
                    DirectCast(e.Row.Cells(e.ColumnIndex), GridViewCellInfo).ErrorText = "Directory not found!"
                ElseIf FileAcc.CountFilePrefixWithExt(e.Value, e.Row.Cells("FilePrefix").Value, e.Row.Cells("FileExtension").Value) = 0 Then
                    DirectCast(e.Row.Cells(e.ColumnIndex), GridViewCellInfo).ErrorText = "Files not found!"
                Else
                    DirectCast(e.Row.Cells(e.ColumnIndex), GridViewCellInfo).ErrorText = String.Empty
                End If
            Case "FilePrefix"
                If FileAcc.CountFilePrefix(e.Row.Cells("FileDirectory").Value, e.Value) = 0 Then
                    DirectCast(e.Row.Cells(e.ColumnIndex), GridViewCellInfo).ErrorText = "Files not found!"
                Else
                    DirectCast(e.Row.Cells(e.ColumnIndex), GridViewCellInfo).ErrorText = String.Empty
                End If
            Case "FileExtension"
                If FileAcc.CountFileExt(e.Row.Cells("FileDirectory").Value, e.Value) = 0 Then
                    DirectCast(e.Row.Cells(e.ColumnIndex), GridViewCellInfo).ErrorText = "Files not found!"
                Else
                    DirectCast(e.Row.Cells(e.ColumnIndex), GridViewCellInfo).ErrorText = String.Empty
                End If
        End Select
    End If
End Sub



AND TADA :                                                                        **** THE MAGIC ***** 

Private Sub rgvSrcExtractFiles_CellFormatting(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles rgvSrcExtractFiles.CellFormatting
    Dim cell As GridDataCellElement = TryCast(e.CellElement, GridDataCellElement)
    If cell IsNot Nothing Then
        If cell.ContainsErrors Then
            'Uncomment to draw a red border around cell as well
            'cell.DrawBorder = True
            'cell.BorderBoxStyle = BorderBoxStyle.SingleBorder
            'cell.BorderWidth = 2
            'cell.BorderColor = Color.Red
            'cell.ImageAlignment = ContentAlignment.MiddleRight
 
            Dim prov As New ErrorProvider
            Dim conv As New ImageConverter
            cell.Image = conv.ConvertFrom(prov.Icon)
 
            cell.TextImageRelation = TextImageRelation.TextBeforeImage
            cell.ImageAlignment = ContentAlignment.MiddleRight
            cell.ImageLayout = ImageLayout.None
        Else
            'Resets the borders to the original value
            'cell.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local)
            'cell.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local)
            'cell.ResetValue(LightVisualElement.BorderWidthProperty, ValueResetFlags.Local)
            'cell.ResetValue(LightVisualElement.BorderColorProperty, ValueResetFlags.Local)
 
            cell.Image = Nothing
        End If
    End If
End Sub

That's it folks. You can use EITHER Solution 1 or 2, but you have to include the magic irrespective of which one you choose.
Hope this saves you some hours. 

Sharing is Caring
The_O
Stefan
Telerik team
 answered on 27 Sep 2011
1 answer
113 views
How do you enable a pivot table with your control?
Stefan
Telerik team
 answered on 27 Sep 2011
1 answer
152 views
How can I highlight RadSplitButton to make it more visible  when focused. I tried setting up explicitly IsMouseOver = true on focus enter event, but it doesn't work. Is there any other way I can do it?

Thanks.
Stefan
Telerik team
 answered on 27 Sep 2011
1 answer
206 views
There is a property for the main masterviewtemplate of a RadGridView to set the rows to auto size if you have a column's WordWrap turned on (i.e., this.radGridViewRequests.AutoSizeRows = true ).  This works slick.
BUT, for a child template there is no such property to AutoSizeRows if you have a column's WordWrap turned on.  So what is one supposed to do to get the child template rows to resize properly?
Stefan
Telerik team
 answered on 27 Sep 2011
1 answer
122 views
I looking for ideas on how display order data from my different departments.  Which sounds simply but each department may have difined custom fields specific to their needs


Base order table
DepartmentID
Customer Name
Company Name
PHone


Customized Portion
CustomField1
CustomField2
CustomField3
and so on.

The custom fields can contain text, numeric or date data.  The field descriptions can differ depening on how the department has customized the fields.


Let me show an example of what I would like to do if possbile


Department | Company Name |Customer Name | Created Date
+ Sales - East | AA Comp |John Smith | 10/1/2010
+ Sales - East | BB Comp |Jim Smith | 6/1/2010
+ Sales - West | CC Comp |Rodney Smith | 10/1/2010
+ Sales - West | DD Comp |Allen Smith | 10/1/2010


Expanded View
Deparment         | Company Name |Customer Name | Created Date
- Sales - East      | AA Comp            |John Smith        | 10/1/2010

                   Account Type |Account Stage |Client Type | Close Date
                       III-VI              |Active              |New           | 12/1/2010
                       III-XI              |Active              |Existing       | 12/15/2010

+ Sales - East      | BB Comp             |Jim Smith          | 6/1/2010
- Sales - West      | CC Comp            |Rodney Smith   | 10/1/2010

                      Probability |Estimated Revenue |Close Date
                      80%          |$250,000.00          |12/1/2010
                       25%          |$25,000.00            |12/15/2010

+ Sales - West | DD Comp |Allen Smith | 10/1/2010


As you can see from the sample the sub grid contains the departments user defined fields which can different headers and display formats. 

My main question is this even possible with the grid view control?

Thanks in advance your time.

Julian Benkov
Telerik team
 answered on 27 Sep 2011
1 answer
148 views
Hi,
I have a chart with 4 series (created programatically).  3 series are spline type and 1 is point type.  I need the point type series to be on top of the spline series but i cannot find a way to make the point series to draw on top of the splines.  Look at the attached image to see the problem.

I tried using series.BringToTop() but it crashes the app, I also tried changing the order of creating the series and order of adding them to the chart.Series container but that doesn't change the z-order.  Any suggestions on how to accomplish this?
Thanks.
Yavor
Telerik team
 answered on 27 Sep 2011
1 answer
315 views
Hi,

I want to be able to delete cell data when I hit delete button when the cell only are focused but not in edit mode.
Right now the hole row are deleted. I also want to be able to delete the row, but this should only happen when I have selected the hole row. How can i achieve this kind of functionality?

Regards
Svein Thomas
Stefan
Telerik team
 answered on 27 Sep 2011
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?