Telerik Forums
UI for WinForms Forum
1 answer
175 views
Is it possible/feasible to have a single multi-line textbox that has two properties:  1.  simple text format (like notepad), and 2. a rich text editor (not HTML format but RTF format).  When the user edits the contents of the multi-line textbox and uses ribbon options, at any time, I need to obtain the ".text" property and get the literal text without all the RTF markup, and if I simultaneously obtain the ".rtf" property, then I get all the text with the embedded rtf format.
I am not an expert in this area, so perhaps my expectation is beyond reality.  However, I am extending a vb6-COM based application with a "com-interop" call out to my .NET library using Telerik controls.  This vb6-COM based application contains a control that functions exactly as above, and I want to reproduce that in my .NET application extension so that I can allow editing of those memos (they are stored in sql as varchar(max)); each of those memo fields in the application database contain two fields "mymemofieldRTF" and "mymemofieldTEXT", and when a user edits one of those memo fields in the vb6-COM based app, the app updates both the "...RTF" and "...TEXT" fields in the database.  When I view the "...RTF" field in the database, it starts with something that looks like:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17

The "...TEXT" version has only raw text as you might find if you edited simply in notepad.

I want to mimic this process in my app, and so I am hoping the WinForm RichTextBox will support this or allow me to extend the class with some relatively simple settings or overrides.
Thanks!
Larry Brindise
Jack
Telerik team
 answered on 29 Sep 2011
1 answer
257 views
I have pageview control when can display 1 or many tabs.  In the case where there is only 1 page of data to display I would like to hide the tab caption.


Ivan Petrov
Telerik team
 answered on 29 Sep 2011
5 answers
661 views
Hi,

i converted a solution from Version 2011.1.11.419 to 2011.2.11.712 and now something with RadGrid.Refresh(); doesn't work as it does before.
Is this a known issue or should i call an other function?
I've got a context menu to manipulate the data of a column in multiple selected rows, after that i call Refresh() to show the new data. This worked fine in version 419...
The grid is bound to an EF-datasource, which is written to the DB in a separate function, after all modifications to the data are done.

The code looks like this:
if (this.grdEinheiten.SelectedRows.Count > 0)             
{                 
foreach (GridViewRowInfo row in grdEinheiten.SelectedRows)                 
{                     
if (row.DataBoundItem is ClientTableItem)                     
{                         
ClientTableItem item = (ClientTableItem)row.DataBoundItem;
switch (art)                         
{                             
case something:
item.Something = value;
break;                             


...
default:                                 
break;                         
}                         
}                 
}                 
this.grdEinheiten.Refresh();             
}

Best regards
Julian Benkov
Telerik team
 answered on 29 Sep 2011
4 answers
252 views
hi there

RadWizard-Control does not select the pages which are assigned!

radWizard1.SelectedPage = wizardPage1  ->does not set the current page correctly
radWizard1.SelectedPage = radWizard1.Pages[n]    -->does not set the current page correctly

My Example inlcudes 0=welcomePage, 1=CalenderPage, 2=RulePage, 3=Staffinfopage (Help page), 4=FinishPage

Routes allowed are: 0-4,  0-1-4,  0-2-4,  0-3-0, 1-3-1, 2-3-2, 4-3-4

If checking RadWizard.Pages[2].AccessibleName it show the correct Name "RulerPage"
but if assigning "radWizard1.SelectedPage = radWizard1.Pages[2]  another page is displayed.

I have shuffled around the Pages in the Pages.Collection and it seems that a wrong Pointer is returned.
Also it should be possible to  select a WizardPage by "radWizard1.SelectedIndex=1"

Please fix or show me another way thats working, currently its not usable for me!

Thanks Daniel

Richard Slade
Top achievements
Rank 2
 answered on 29 Sep 2011
1 answer
243 views
I want to show a CheckBox column without a box around it (just the tick or empty). But i am not sure how to style this. My GridviewCheckBoxColumn is readonly in this case so i want to just show a Tick mark when the file is true otherwise leave blank. Here is the code where i add the column to radgridview:
Please help
Thanks
GridViewCheckBoxColumn colIsActive = new GridViewCheckBoxColumn("IsActive");
 colIsActive .Width = 50;
 colIsActive .HeaderText = "Active";
 colIsActive .ReadOnly = true;
 colIsActive .WrapText = true;
 //colIsActive .style???= no box around ???
 _radGV.MasterTemplate.Columns.Add(colIsActive );




Stefan
Telerik team
 answered on 28 Sep 2011
4 answers
850 views
Hi,

I have a listbox being used on a touchscreen based PC.  I would like to be able to scroll my list up and down by dragging on the list itself and then pressing an item within the list to select it. 

Failing that is there any way to increase the width of the scrollbars so that dragging the vertical scrollbar is easier?

Regards,

Jon

Stefan
Telerik team
 answered on 28 Sep 2011
1 answer
230 views
Hi

How do I get rid or hide the first column in a datagrid. It is the column that shows a right arrow when you select a row. Attached is a screen grab of the column I mean

Cheers
Stefan
Telerik team
 answered on 28 Sep 2011
1 answer
407 views
I know that there are many forum posts regarding filtering but I am having the hardest time trying to figure out how to accomplish this filter scenario:

I have 4 columns, Rdel, RAdd, RMod, RErr.
right now I have those columns set as Integer type in my datatable that I bind to the radgridview.  I handle changhing the values as need be but I need to be able to use filters so that I can not rows.  The way I have been trying to set the filters up I have used a custom context menu that uses a check type menuitem.  So when that value changes I am trying to add or remove descriptors.  So I may have many or no filters applied to the grid.  Right now I have something like this and it sort of works but I just wanted to kbnow if there is a better way of doing this.

  Public Const conMODIFIED As String = "RMod"
    Public Const conADDED As String = "RAdd"
    Public Const conDELETED As String = "RDel"
    Public Const conERRORROW As String = "RErr"
    Public Const conCHANGESLINK As String = "RCHGS"
    Public Const conROWID As String = "iRowID"
    Public Const conLSGRDTYPE As String = "lsGrdDataType"
    Public Const conCHFLAG As Integer = 1 '"x"
    Public Const conUCHFLAG As Integer = 0 '""

Public Sub ViewRowStates(Optional ByVal UnchangedRows As Boolean = True, Optional ByVal ChangedRows As Boolean = True, _
                         Optional ByVal AddedRows As Boolean = True, Optional ByVal DeletedRows As Boolean = True, _
                         Optional ByVal ErrorRows As Boolean = False)
 
    Me.FilterDescriptors.Remove(conADDED)
    Me.FilterDescriptors.Remove(conMODIFIED)
    Me.FilterDescriptors.Remove(conDELETED)
    Me.FilterDescriptors.Remove(conERRORROW)
    Dim cFilter As New Telerik.WinControls.Data.CompositeFilterDescriptor
    If Not UnchangedRows Then
        Dim compFilter As New Telerik.WinControls.Data.FilterDescriptor
        compFilter.PropertyName = conMODIFIED
        compFilter.Operator = Telerik.WinControls.Data.FilterOperator.IsEqualTo
        compFilter.Value = conCHFLAG
        compFilter.IsFilterEditor = True
        cFilter.FilterDescriptors.Add(compFilter)
    End If
    If Not ChangedRows Then
        Dim compFilter As New Telerik.WinControls.Data.FilterDescriptor
        compFilter.PropertyName = conMODIFIED
        compFilter.Operator = Telerik.WinControls.Data.FilterOperator.IsNotEqualTo
        compFilter.Value = conCHFLAG
        compFilter.IsFilterEditor = True
 
        cFilter.FilterDescriptors.Add(compFilter)
    End If
    If Not AddedRows Then
        Dim compFilter As New Telerik.WinControls.Data.FilterDescriptor
        compFilter.PropertyName = conADDED
        compFilter.Operator = Telerik.WinControls.Data.FilterOperator.IsNotEqualTo
        compFilter.Value = conCHFLAG
        compFilter.IsFilterEditor = True
 
        cFilter.FilterDescriptors.Add(compFilter)
    End If
    If Not DeletedRows Then
        Dim compFilter As New Telerik.WinControls.Data.FilterDescriptor
        compFilter.PropertyName = conDELETED
        compFilter.Operator = Telerik.WinControls.Data.FilterOperator.IsNotEqualTo
        compFilter.Value = conCHFLAG
        compFilter.IsFilterEditor = True
 
        cFilter.FilterDescriptors.Add(compFilter)
    End If
    If Not ErrorRows Then
        Dim compFilter As New Telerik.WinControls.Data.FilterDescriptor
        compFilter.PropertyName = conERRORROW
        compFilter.Operator = Telerik.WinControls.Data.FilterOperator.IsNotEqualTo
        compFilter.Value = conCHFLAG
        compFilter.IsFilterEditor = True
 
        cFilter.FilterDescriptors.Add(compFilter)
    End If
 
    Me.FilterDescriptors.Add(cFilter)
End Sub


If there is a better way to handle this scenario I would appreciate any suggestions.   The main thing is that I will add and remove filters on a single column and not want to lose the existing ones.  I would also need to be able to only see the rows that have a 1 in any of those columns.  A row could have a 1 in conAdded, conModified, and conDeleted.  That is so I can undo a single operation, such as a delete and still know that row was added.

Thanks once again.

Nick
Alexander
Telerik team
 answered on 28 Sep 2011
4 answers
414 views

Hello

I' going to Load Data from a nested generic list and Bind it to a radGridView. But I could not do that

this is my list:

List<List<string>> Mylist = new List<List<string>>();
and I add items into the list like below:

Mylist.Add(new List<string> { str1, str2, str3 });
at the end I set the gridview dataSource like this:

DGV1.DataSource = Mylist;
But it does not show the data from the list. the grid has 2 columns: Capacity, Count

Does anyone knows How I can Bind Mylist to the grid?

thanks

Julian Benkov
Telerik team
 answered on 28 Sep 2011
3 answers
217 views
Hi all,

I have a grid view with multiple columns, on which I want to apply filtering. When I use multiple filters, I get an exception of type

ArgumentOutOfRangeException
Index must be within the bounds of the List.
Parameter name: index

I can't find the cause of this, so does anybody have an idea of what's going wrong here? Grouping is also applied to the gridview (but I also tested without grouping with same exception as result).

The complete callstack is this:  
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.Insert(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.InsertItem(Int32 index, T item)
   at Telerik.Collections.Generic.NotifyCollection`1.InsertItem(Int32 index, T item)
   at Telerik.WinControls.UI.GridViewFilterDescriptorCollection.InsertItem(Int32 index, FilterDescriptor item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at Telerik.WinControls.UI.GridViewDataColumn.SetFilterDescriptor(FilterDescriptor value)
   at Telerik.WinControls.UI.RadListFilterMenuProvider.SetFilterDesriptor(GridViewDataColumn dataColumn, FilterDescriptor descriptor)
   at Telerik.WinControls.UI.RadListFilterMenuProvider.SetFilterDescriptor(FilterDescriptor descriptor)
   at Telerik.WinControls.UI.RadListFilterMenuProvider.ButtonOK_Click(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Telerik.WinControls.RadItem.OnClick(EventArgs e)
   at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
   at Telerik.WinControls.RadItem.DoClick(EventArgs e)
   at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
   at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
   at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at Telerik.WinControls.UI.RadPopupControlBase.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at WinWorkFlow.Program.Main(String[] args) in C:\Data\TeamProjects\devc#2009\MuseumWorkflow.root\MuseumWorkflow\WinWorkFlow\Program.cs:line 19

Thanks,
Christ
Julian Benkov
Telerik team
 answered on 28 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?