Telerik Forums
UI for WinForms Forum
13 answers
612 views
Hi

I am new to Yelerik controls and need some help..

I am having a problem looping trough selected items in a ListBox and get the selected value of the item..

Usually i would do this in a foreach loop:

private ArrayList GetItems() 
        { 
            ArrayList retVal = new ArrayList(); 
            for(int i = 0; i < listBoxLanguages.Items.Count; i++) 
            { 
                if(listBoxLanguages.GetSelected(i) == true
                    retVal.Add(i); 
            } 
            return retVal; 
        } 

but this does not work in RadListBox control...... GetSelected method does not exist :-(

Any help in appreciated.
Stefan
Telerik team
 answered on 22 Nov 2012
4 answers
392 views
The documentation does not show how to capture the events from the custom Item buttons.

http://www.telerik.com/help/winforms/listview-custom-items.html

Please can we have an example in vb.net 

thanks
Stefan
Telerik team
 answered on 22 Nov 2012
1 answer
296 views
Hi Telerik Team,

I am getting this error:

,"App Excep: System.Web.HttpException: An error occurred while communicating with the remote host. The error code is 0x80070001. ---> System.Runtime.InteropServices.COMException (0x80070001): Incorrect function. (Exception from HRESULT: 0x80070001)

   --- End of inner exception stack trace ---

   at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)

   at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size)

   at System.Web.HttpRequest.GetEntireRawContent()

   at System.Web.HttpRequest.FillInFormCollection()

   at System.Web.HttpRequest.get_Form()

   at System.Web.HttpRequest.get_Item(String key)

   at Telerik.Web.UI.RadCompression.IsAjaxRequest()

   at Telerik.Web.UI.RadCompression.Compress(HttpApplication application)

   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Monday, November 19, 2012   at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)

   at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size)

   at System.Web.HttpRequest.GetEntireRawContent()

   at System.Web.HttpRequest.FillInFormCollection()

   at System.Web.HttpRequest.get_Form()

   at System.Web.HttpRequest.get_Item(String key)

   at Telerik.Web.UI.RadCompression.IsAjaxRequest()

   at Telerik.Web.UI.RadCompression.Compress(HttpApplication application)

   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Void RaiseCommunicationError(Int32, Boolean)System.Runtime.InteropServices.COMException (0x80070001): Incorrect function. (Exception from HRESULT: 0x80070001)",2012-11-19 19:45:51.227

 


This error is coming on the production server. this is not coming on local or the staging server. I am using asp.net 2.0 and sql server 2008. and using telerik..is this something related to telerik..
please help..this is urgent.. i think this errror comes when there is load on the server.
Martin
Telerik team
 answered on 22 Nov 2012
1 answer
99 views
Simple question that I was not quite able to find an answer to...
I have a binding list collection of Person objects.  Each Person object has a collection of Person objects.  For example, everyone is a person.  Some persons have children.  They are persons.  They can have kids, and so on and so on.

I bound this to a tree view but only got the first level of items.  I then added ParentMember and ChildMember values - these are used for a simple collection as compared to my hierarchy of same nodes thus it did not work.  I then tried to use the Object Relation mode and specified a display value that hit the first level of nodes and then went to the second level - "PersonName\\PersonName".  I did the same with the ValueMember.  Great, I now got two levels of tree control. 

The question is how to get N levels?  Do I do something like "PersonName\\*" in an attempt to tell it to repeat?  Do I need to do this manually rather than binding?

And lastly, I did read that Drag And Drop will NOT work with bound Trees.  If that is the case then I will do all of this work manually - I would think that you could support drag and drop but would have to rely on my code to actually do the movement of the actual data structure.
Peter
Telerik team
 answered on 22 Nov 2012
4 answers
747 views
I have a RadGridView with a GridViewDecimalColumn.  A row has the value of 51.34.  I set the DecimalPlaces property to 0 but the value still displays as 51.34.  Should this not display as 51?
Jippy
Top achievements
Rank 1
 answered on 22 Nov 2012
2 answers
190 views
I have set my RadDock MainDocumentContainerVisible = false and BorderStyle = none. But there is still a borderline on the left and top. If I set the BorderStyle to FixedSingle, the whole thing has a border, but the Left and Top still have an extra wide border. What is causing this?

Thanks,

G
Glenn
Top achievements
Rank 1
 answered on 21 Nov 2012
1 answer
97 views
I have radgridview with data written in design time i.e, code
this.radGridView1.Rows.Add("Jjkh", 19, 2, 9, 12, 21,52, 44, 63,56, System.DateTime.Now);
            this.radGridView1.Rows.Add("Jjkh", 10, 2, 9, 12, 21, 52, 44, 63, 87, System.DateTime.Now);
            this.radGridView1.Rows.Add("eur", 16, 2, 9, 12, 21, 52, 44, 63, 34, System.DateTime.Now);
            this.radGridView1.Rows.Add("usd", 14, 2, 9, 12, 21, 52, 44, 63, 23, System.DateTime.Now);
            this.radGridView1.Rows.Add("Jjkh", 67, 81, 33, 4, 55, 66, 7, 7, 11, System.DateTime.Now);
After this i've written code for forecolor:
for (int i = 0; i < radGridView1.Rows.Count; i++)
            {
                for (int j = 1; j < 4; j++)
                    this.radGridView1.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.White;
                this.radGridView1.Rows[i].Cells[4].Style.ForeColor = System.Drawing.Color.Blue;
                this.radGridView1.Rows[i].Cells[5].Style.ForeColor = System.Drawing.Color.Red;

            }
But for back color, i've written in radGridView1_CellFormatting,
e.CellElement.BackColor = Color.Blue;
But the event radGridView1_CellFormatting is not binding with any method..
Anton
Telerik team
 answered on 21 Nov 2012
5 answers
504 views
Prior to using RadGridView, i made use of the new DataGridView in .NET 2.0.

consider the code below, where i successfully populate the row headers:

string[] userInputParams = new string[] {"apples","oranges",
                                                              "mangos",
                                                              "guanábana"}
 for (int i = 0; i < userInputParams.Length; i++)
 {
                gridRows.Add();
                gridRows[i].HeaderCell.Value = userInputParams[i];
}

How would i acheive this with the telerik RadGridView winform control?

thank you
Jack
Telerik team
 answered on 21 Nov 2012
1 answer
260 views
Hi,

I've noticed that you can check whether the selected font in the richtextbox is bold or italic, but not whether it is both bold and italic. Checking for bold or italic can be done likeso:

Dim style As StyleDefinition = SelectedEditor.CurrentEditingStyle
      Dim fontWeight As TextStyle = DirectCast(style.GetPropertyValue(Span.FontStyleProperty), TextStyle)
 
      btnFontBold.Checked = fontWeight = TextStyle.Bold
      If fontWeight = TextStyle.Bold Then
          btnFontBold.Checked = True
      ElseIf fontWeight = TextStyle.Italic Then
          btnFontItalic.Checked = True
      End If

However, I cannot seem to find a way to check for both bold and italic text, as the only members of TextStyle are Bold, Italic, and Regular. Is there a way to do this?
Plamen
Telerik team
 answered on 21 Nov 2012
1 answer
178 views
Hi,

I have several grids on RadForm. I want to resize grids and columns for the next time.
How I can do it.

Thank you for advance
Stefan
Telerik team
 answered on 21 Nov 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)
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?