Telerik Forums
UI for WinForms Forum
6 answers
436 views
I have almost rounded all my controls but not the RadTabStrips as well as the corner of each of the tab header.
Also the background color is not changed. On the RadGridView I cannot change the column headers background color. Managed to change the border, the shape and other details, but not the background color.

Attached is a screen capture where can be seen in red the RadTabStrip with light gray background. In orange the RadGridView with gray column headers and in blue the small tab header with blue color and not round corners.

Thanks in advance for your help
Nikolay
Telerik team
 answered on 22 Feb 2012
2 answers
456 views
Hello dear Telerik team.
I am using RadDropDownList to let the user choose from four options. Those options are absolutely static, so I create four dropDownItems hardcoded. Each option has its text and image. I can define each item by a lode like :

var radListDataItem1 = new RadListDataItem();
            radListDataItem1.Image = Properties.Resources.SomeImage;
            radListDataItem1.Text = "Sometext";           
            radListDataItem1.Value = someValue;

            var source = new BindingList<RadListDataItem>();

            source.Add(radListDataItem1);

            cmbTriggerType.DataSource = source; //cmbTriggerType is my RadDropDownList

//same for three more items

            cmbTriggerType.SelectedIndex = 0;

And now here comes the question! :)
What should I do to cause your control to render each DataItem  with both text and image visible?
Thanks in advance.
Artem
Artem
Top achievements
Rank 1
 answered on 21 Feb 2012
1 answer
144 views
Private Sub InsertNewContactDetails()
 
        Dim iSql As String = "Insert into CompanyDetails (EmailOffice,EmailAdmin,EmailOrders,EmailAccounts,EmailOther,ContactPersonOffice,ContactPersonAdmin,ContactPersonOrders,ContactPersonAccounts,ContactPersonOther,ContactNumber,ContactNumberExtension,ContactnumberFax,ContactNumberFaxExtension,ContactNumberMobile1,ContactNumberMobile2,ContactNumberDirectNumber,ContactNumberFaxToEmail) VALUES ( ' " + txtEmailOffice.Text + " ',' " + txtEmailAdmin.Text + " ' ,' " + txtEmailOrders.Text + " ' ,  ' " + txtEmailAccounts + " ' , ' " + txtEmailOther.Text + " ',  ' " + txtContactPersonOffice.Text + " ', ' " + txtPostalAddress1.Text + " ',' " + txtPostalAddress2.Text + " ', ' " + cmbPostalAddress3.Text + "','" + cmbCategory.Text + "' ,'" + cmbClassification.Text + "')"
        Dim da As New OleDb.OleDbDataAdapter(iSql, MyConnection)
        Dim dt As New DataTable
        da.Fill(dt)
        da.Dispose()
        myDataSet()
        txtEmailOffice.Text = ""
 
    End Sub
i've got a form that i am working on and on that form i have a radpageview control which has several pages . my text boxes are on the radpageviewpage control and my butttons are on the main form. the code to insert information on the first radpageviewpage is working well however the code to insert information on the second radpageviewpage is not accepting my code. when I use the code above I get the following error

"Operator '+' is not defined for types 'String' and 'Telerik.WinControls.UI.RadTextBox'." 
Ivan Petrov
Telerik team
 answered on 21 Feb 2012
4 answers
414 views
According to this Thread I tried to implement the (missing?) feature, but there is no "ScrollableRows" in RadListView.
How can I achieve my goal?
Froggie
Top achievements
Rank 1
 answered on 21 Feb 2012
1 answer
124 views
I have a RadDateTimePicker being used inside a hosted item on a RadCommandBar. It shows up fine, and is operational, but if I set the value on the RadDateTimePicker at runtime, it doesn't update. The value property of the RadDateTimePicker does get updated, just not visually on the form. Is there a workaround for this?

I'm using 2011.3.11.1229 of the Telerik controls for WinForms.

Here is the code I'm using to create the RadDateTimePickers and assign them to the hosted item:

        Dim raddatetimepicker_from As Telerik.WinControls.UI.RadDateTimePickerElement
        Dim raddatetimepicker_thru As Telerik.WinControls.UI.RadDateTimePickerElement

        'Create RadDataimePickers
        raddatetimepicker_from = New Telerik.WinControls.UI.RadDateTimePickerElement
        raddatetimepicker_thru = New Telerik.WinControls.UI.RadDateTimePickerElement
        raddatetimepicker_thru.MaxDate = DateTime.Today

        'Format RadDateTimePickers and insert into host
        Dim SizeDTP As New System.Drawing.Size
        SizeDTP.Height = 0
        SizeDTP.Width = 95

        raddatetimepicker_from.MinSize = SizeDTP
        raddatetimepicker_thru.MinSize = SizeDTP

        raddatetimepicker_from.Format = DateTimePickerFormat.Short
        raddatetimepicker_thru.Format = DateTimePickerFormat.Short

        'Assign to hosted item on command bar
        cbhi_from_date.HostedItem = raddatetimepicker_from
        cbhi_thru_date.HostedItem = raddatetimepicker_thru

Here is the code I am using to assign the value, which doesn't cause the RadDateTimePicker to visually update:

        raddatetimepicker_from.Value = DateTime.Now.AddDays(DaysBack * -1)

Any help would be great, don't want to have to fallback to the standard DateTimePicker because I don't believe I can host that in a RadCommandBar. Maybe there is some sort of a "refresh" function I should be using, but I haven't needed to do this in the past when the RadDateTimePicker is just on a regular form instead of inside a hosted item.
Peter
Telerik team
 answered on 21 Feb 2012
4 answers
314 views
i cant but seem to  retrieve  indivijual values of elements from a ListviewElement 

radListView1.ItemValueChanged += (s, e) => { Edited.Add(new ListViewEditedItems() { Loan = e.ListViewElement.Columns[0].ToString(), Recovery = e.ListViewElement.Columns[1].ToString(), CurrInstNo = e.ListViewElement.Columns[2].ToString(), TotInstNo = e.ListViewElement.Columns[3].ToString(), AmtDrawn = e.ListViewElement.Columns[4].ToString(), AmtRecoverd = e.ListViewElement.Columns[5].ToString(), BalAmt = e.ListViewElement.Columns[6].ToString() }); };

e.ListViewElement.Columns[0].ToString()
this i suppose was to get the value from the column ..but does'nt seem to be working..
i need to get the value from columns in the listview
idea's please..
Ivan Todorov
Telerik team
 answered on 21 Feb 2012
7 answers
231 views
In my RadListView the BackgroundImage (and the Backgroundcolor as well) are ignored.
ViewType is IconsView, but this doesn't matter because it is not shown in all ViewTypes.
Is this a bug or what?
Nikolay
Telerik team
 answered on 21 Feb 2012
1 answer
1.2K+ views
I have bound a BindingList holding my business objects to a GridView which displays fine.  Then I reset the grid and I converted the list to a DataTable and bind it to a gridview.  The business objects have an enum property for which the appropriate string name is displayed when the objects are bound, however only the integer value of the enum is displayed when the datatable is bound.  I use the same predefined group of GridViewDataColumns for both scenarios.  The extension method generates a datacolumn with the datatype of my enum.  What should I do to get the enum string name to display when the datatable is bound?  I just want the string in a textbox, this grid is strictly read only.

List<WorkItem> _workitems = new List<WorkItem>();
List<GridViewDataColumn> _workitemColumns = new List<GridViewDataColumn>();
 
_workitemColumns.Add(new GridViewTextBoxColumn() { DataField = "InstanceID", HeaderText = "Instance ID" });
_workitemColumns.Add(new GridViewTextBoxColumn() { DataField = "StorageObjectID", HeaderText = "Object ID" });
_workitemColumns.Add(new GridViewTextBoxColumn() { DataField = "Document.BatchID", HeaderText = "Batch ID" });
_workitemColumns.Add(new GridViewTextBoxColumn() { DataField = "ReferenceTypeName", HeaderText = "Document Type" });
_workitemColumns.Add(new GridViewDateTimeColumn() { DataField = "CreateDate", HeaderText = "Create Date", ExcelExportType = DisplayFormatType.Custom, ExcelExportFormatString = "MM/dd/yyyy hh:mm:ss" });
_workitemColumns.Add(new GridViewTextBoxColumn() { DataField = "Title", HeaderText = "Title" });
_workitemColumns.Add(new GridViewTextBoxColumn() { DataField = "OwningUser", HeaderText = "Assigned User" });
_workitemColumns.Add(new GridViewTextBoxColumn() { DataField = "Status", HeaderText = "Status"});
 
#region this works
 
foreach (GridViewDataColumn curCol in this._workitemColumns)
{
    this.workItemsGridView1.Columns.Add(curCol);
}
 
BindingList<WorkItem> bindingWorkitems = new BindingList<WorkItem>(this._workitems);
BindingSource dbBindSource = new BindingSource();
dbBindSource.DataSource = bindingWorkitems;
this.workItemsGridView1.DataSource = dbBindSource;
 
#endregion
 
#region does not work
 
DataTable workitemsDT = this._workitems.ToDataTable();
 
foreach (GridViewDataColumn curCol in this._workitemColumns)
{
    this.workItemsGridView1.Columns.Add(curCol);
}
 
foreach(GridViewDataColumn curCol in this._layerColumns[this._selectedLayer])
{
    this.workItemsGridView1.Columns.Add(curCol);
}
 
this.workItemsGridView1.DataSource = workitemsDT;
 
#endregion
 
public static DataTable ToDataTable<T>(this List<T> items)
{
    var tb = new DataTable(typeof(T).Name);
 
    PropertyInfo[] props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance);
 
    foreach (var prop in props)
    {
    if (prop.PropertyType.IsGenericType && prop.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>))
    {
        tb.Columns.Add(prop.Name, prop.PropertyType.GetGenericArguments()[0]);
    }
    else
        tb.Columns.Add(prop.Name, prop.PropertyType);
    }
 
    foreach (var item in items)
    {
    var values = new object[props.Length];
    for (var i = 0; i < props.Length; i++)
    {
        values[i] = props[i].GetValue(item, null);
    }
 
    tb.Rows.Add(values);
    }
 
    return tb;
}
Julian Benkov
Telerik team
 answered on 21 Feb 2012
1 answer
106 views
Is there a simple example to print the contents of a gridview?

Best regards,

G
Ivan Petrov
Telerik team
 answered on 21 Feb 2012
3 answers
148 views
Hi,

When using RadMessageBox in RTL mode the last word is always printed in a new line, such that only the upper half of the word is visible (making it impossible to read).

BTW - do you have any plans on releasing a right-to-left Ribbon?

Thanks,
Roy
Ivan Todorov
Telerik team
 answered on 21 Feb 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
ProgressBar
CheckedDropDownList
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
VirtualKeyboard
NavigationView
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?