Telerik Forums
UI for WinForms Forum
1 answer
398 views
 Hi,
    I have to added a custom elements (RadTextBoxElement) to grid cells on the CellFormatting event at runtime.
RadTextBoxElement textbox = new RadTextBoxElement();  
textbox.Alignment = ContentAlignment.MiddleCenter;  
textbox.KeyPress += new KeyPressEventHandler(textbox_KeyPress);  
textbox.TextChanged += new EventHandler(textbox_TextChanged);  
e.CellElement.Children.Add(textbox); 

    I would like to limit the value of textbox not over 99 but i can't set the max length property of the RadTextBoxElement.
Can you help me for solve this problem ?
Martin Vasilev
Telerik team
 answered on 12 Sep 2008
1 answer
87 views

Hi,
    I have to added a custom elements (RadTextBoxElement) to grid cells on the CellFormatting event at runtime.

RadTextBoxElement textbox = new RadTextBoxElement();  

textbox.Alignment = ContentAlignment.MiddleCenter;  

textbox.KeyPress += new KeyPressEventHandler(textbox_KeyPress);  

textbox.TextChanged += new EventHandler(textbox_TextChanged);  

e.CellElement.Children.Add(textbox); 

    I would like to limit the value of textbox not over 99 but i can't set the max length property of the RadTextBoxElement.
Can you help me for solve this problem ?

Martin Vasilev
Telerik team
 answered on 12 Sep 2008
1 answer
73 views
hi :o)

I have a combo box which displays a list of available subject areas for a university. It is populated from a table with 3 fields.

Id, SubjectArea, Description.

Is it possible to show a tooltip that contains the field "Description" that relates to the "SubjectArea" item you are hovering over.

I hope this makes sense :o)

Thank you so much for your help

Tim :)
Dimitar Kapitanov
Telerik team
 answered on 12 Sep 2008
1 answer
150 views

I 'm working on a program that uses a RadTabStrip. The program has two static tabs and then allows the user to add more at runtime.  Once the new tabs are added, they cannot be removed, but they can be hidden.

I am having two problems:

The first problem happens when the user adds several tabs that exceed the width of the window and the scroll buttons become visible.   If the user scrolls over to the tabs on the right and then hides some tabs, the scroll buttons disappear and there is no way to easily get to the tabs that have scrolled off the left side of the form.

I figured that I would program my own scroll buttons and ran into the scond problem.  My buttons work well except for scrolling to the left most tab.  When I attempt to scroll to the left most tab, the program gets cought in an endless loop.

I have an example program you can download from my website.  It is a very small program that demontrates the problem.  It has a RadTabStrip and several buttons.  The first button allows adding tabs.  The second button hides the tabs one at a time. The third button unhides tabs one at a time.  The fourth button attempts to scroll to the left.

  1. Run the program
  2. Hit the "Add Tab" button four or five times until the scroll buttons pop up.
  3. Use the scroll buttons to scroll all the way over to the right until the right scroll buttons disables itself.
  4. Hit the "Hide Tab" button two or three times until the scroll buttons disappear.
  5. Note that there is no easy way to get to the left most tabs.
  6. Hit the "Scroll Left" button a few times to try to get to the left most tab.
  7. When you get to the left most tab the program will now be cought in an endless loop.

I hope this example illustrates the problems.  Please let me know if you have any questions.

Ideally, I would like to be able to have the scroll buttons visible all the time.  Also, I would like to be able to programatically scroll to the left most tab without getting cought in a loop.  However, I'm willing to listen to any suggestions or work arounds.

Thank you for your help.

Boyko Markov
Telerik team
 answered on 12 Sep 2008
1 answer
120 views
I was wondering how to make a row display an asterisk when it has been modified?

Thanks.
Brandon
Vassil Petev
Telerik team
 answered on 12 Sep 2008
1 answer
73 views
Hello,

The following issue occurs with 2008Q2 version of the toolstrip.

I have set have a toolbar with more than one RadToolStripItems. These items have some RadButtonElements placed upon them.

During the application life cycle, some of these buttons are hidden by setting the Visibility property to ElementVisibility.Hidden

However once you move the RadToolStripItem containing the hidden button during runtime, because for example you want to reorder your toolstrip, the button suddenly reappears.


Please notifify me of your findings.

Kind regards,

Jack
Boyko Markov
Telerik team
 answered on 12 Sep 2008
1 answer
151 views
Hello,

After your previous support, I can add images to the row header.

Now I'm having some problems when I activate the group by funcionalities. For example, after spending some time analising the code, I founded that if I want to use images in the header row, I need to change ShowRowHeader =  false.

Now I'm having another problem. In same Grids, I get the error:  "Object reference not set to an instance of an object." in the GREEN row

Here Is the code that i'm using:

Dim header As GridTableHeaderRowElement = TryCast(TryCast(Me.DetailedProposals.GridElement, GridTableElement).TableBodyElement.Children(0), GridTableHeaderRowElement)

Me.DetailedProposals.ImageList = Me.ImageList1

For Each element As Telerik.WinControls.RadElement In header.Children

Select Case TryCast(element, GridHeaderCellElement).Text

Case "Molde"

TryCast(element, GridHeaderCellElement).ImageIndex = 0

TryCast(element, GridHeaderCellElement).Text = ""

Case "Print"

TryCast(element, GridHeaderCellElement).ImageIndex = 1

TryCast(element, GridHeaderCellElement).Text = ""

Case "EMail"

TryCast(element, GridHeaderCellElement).ImageIndex = 2

TryCast(element, GridHeaderCellElement).Text = ""

Case "Intranet"

TryCast(element, GridHeaderCellElement).ImageIndex = 3

TryCast(element, GridHeaderCellElement).Text = ""

End Select

element.Alignment = ContentAlignment.MiddleCenter

Next


Can you help? This code works in other radgrid and all columns have name/text

Thank You.
Luis Mauricio

Jack
Telerik team
 answered on 11 Sep 2008
1 answer
71 views
Hello,

We've just purchased your product.

Sofor I have encountered a issue with the image and text alignment of the ListBoxItems, shown in the following code snippet:

Image image = this.GetImageFromImageList(menuItemData.ImageName);

image = ResizeImage(image,

new Size(32, 32));

RadListBoxItem result = new RadListBoxItem(menuItemData.Text);

result.Image = image;

result.DisplayStyle = Telerik.WinControls.

DisplayStyle.ImageAndText;

result.TextImageRelation =

TextImageRelation.ImageBeforeText;

result.TextAlignment =

ContentAlignment.MiddleLeft;

result.Alignment =

ContentAlignment.MiddleLeft;

result.ImageAlignment =

ContentAlignment.MiddleLeft;

The alignment settings don't have any visual effect, no matter what is set to them. My desire is to have the text alligned middle left as to its image. The Aligment however is always performed as TopLeft.

Please let me know how to solve this (if possible)

Kind regards,

Jack

Peter
Telerik team
 answered on 11 Sep 2008
3 answers
139 views
I have read earlier post on invalid character (where there is no match in list items)and code from a user to handle the invalid character.

I suggest "AllowFreeText" boolean property for the combo box. If it is set to "False", there should be a beep and not accept the character which results in no match. Also Backspace should remove a user typed characer and append the matching list item.

I use the following VB (AutoCompletionMode - "Append") code to handle Invalid character and backspace

Private Sub cboDepartment_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboDepartment.KeyUp

Dim Lg As Integer
Dim ComboItem As RadComboBoxItem

Lg = sender.text.length

If
Lg = 0 Then
    Exit Sub
End If

If (sender.finditem(sender.text)) Is Nothing Or e.KeyCode = 8 Then
    If Lg = 1 Then
        
sender.text = ""
        
Exit Sub
    
Else
        
sender.text = sender.text.substring(0, Lg - 1)
    End If

    If e.KeyCode <> 8 Then
        
Beep()
    End If

    ComboItem = sender.finditem(sender.text)
    sender.text = ComboItem.Text
    sender.SelectionStart = Lg - 1
    sender.SelectionLength = sender.Text.Length - (Lg - 1)

End If

End Sub

Better code suggestions will be highly appreciated.

Regards ... DP

Dimitar Kapitanov
Telerik team
 answered on 11 Sep 2008
1 answer
377 views
I am still evaluating the winforms controls. I am quite impressed, however, the controls appear slow.

If I add (for testing purposes) 5 button, 5 labels and 5 textboxes it takes about 1+ sec to load the form and I get a flicker during the load process.
Compare this with the standard VS controls, where there is NO flicker and load time is instant?

Is there an explanation? Is it just that I haven't purchased the controls yet? Or is it that these control are simply slow?

Any information regarding this would be very useful

Regards
Andrew
Jack
Telerik team
 answered on 11 Sep 2008
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?