Telerik Forums
UI for WinForms Forum
4 answers
129 views

I want a neat display of "cards" as shown in the attached image. I will say how many cards per row and how many rows.

how would i do this with radgrid for winforms?

 

(this image is taken from a competitive product)

Dimitar
Telerik team
 answered on 02 Nov 2016
5 answers
317 views

hi everyone

 i use Scheduler in  project and i have problem in shamsi Scheduler?

everyting in ok but month is not shamsi 

i use this code

 

private readonly Calendar cal;
private readonly Calendar[] optionals;
 
 
public PersianCulture()
    : this("fa-IR", true)
{
}
 
public PersianCulture(string cultureName, bool useUserOverride)
    : base(cultureName, useUserOverride)
{
    //Temporary Value for cal.
    cal = base.OptionalCalendars[0];
 
    //populating new list of optional calendars.
    var optionalCalendars = new List<Calendar>();
    optionalCalendars.AddRange(base.OptionalCalendars);
    optionalCalendars.Insert(0, new PersianCalendar());
 
 
    Type formatType = typeof(DateTimeFormatInfo);
    Type calendarType = typeof(Calendar);
 
 
    PropertyInfo idProperty = calendarType.GetProperty("ID", BindingFlags.Instance | BindingFlags.NonPublic);
    FieldInfo optionalCalendarfield = formatType.GetField("optionalCalendars",
                                                          BindingFlags.Instance | BindingFlags.NonPublic);
 
    //populating new list of optional calendar ids
    var newOptionalCalendarIDs = new Int32[optionalCalendars.Count];
    for (int i = 0; i < newOptionalCalendarIDs.Length; i++)
        newOptionalCalendarIDs[i] = (Int32)idProperty.GetValue(optionalCalendars[i], null);
 
    optionalCalendarfield.SetValue(DateTimeFormat, newOptionalCalendarIDs);
 
    optionals = optionalCalendars.ToArray();
    cal = optionals[0];
    DateTimeFormat.Calendar = optionals[0];
 
    DateTimeFormat.MonthNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
    DateTimeFormat.MonthGenitiveNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
    DateTimeFormat.AbbreviatedMonthNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
    DateTimeFormat.AbbreviatedMonthGenitiveNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
 
 
    DateTimeFormat.AbbreviatedDayNames = new string[] { "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" };//{ "ی", "د", "س", "چ", "پ", "ج", "ش" };
    DateTimeFormat.ShortestDayNames = new string[] { "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" };//{ "ی", "د", "س", "چ", "پ", "ج", "ش" };
    DateTimeFormat.DayNames = new string[] { "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" };
 
    DateTimeFormat.AMDesignator = "ق.ظ";
    DateTimeFormat.PMDesignator = "ب.ظ";
 
    /*
    DateTimeFormat.ShortDatePattern = "yyyy/MM/dd";
    DateTimeFormat.LongDatePattern = "yyyy/MM/dd";
          
    DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy/MM/dd"}, 'd');
    DateTimeFormat.SetAllDateTimePatterns(new[] {"dddd, dd MMMM yyyy"}, 'D');
    DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy MMMM"}, 'y');
    DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy MMMM"}, 'Y');
     */
 
}
 
public override Calendar Calendar
{
    get { return cal; }
}
 
public override Calendar[] OptionalCalendars
{
    get { return optionals; }
}

how i fix this problem .

thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Nov 2016
2 answers
1.1K+ views

Hello All, I'm kind a newbie in the WinForms and what I'm trying to do is the following:
I have a RadGridView with a GridViewCheckBoxColumn named "chk" and another GridViewTextBoxColumn named "Serial" and I want to press a button and print the value of “Serial” of the ones from "chk" are checked.
I attached an example of a small GridView with only three values, let’s say I check the first and third, I print “ABCDF” and then print “SerialTest”
Hope anyone can help me or point me with some ideas
Regards!!


Aristofanes
Top achievements
Rank 1
 answered on 01 Nov 2016
1 answer
190 views

I need to set Column(0) foreground color programmatically. I can't find any examples specifically for this. Would someone please share an example or where I can find how its done?

Thanks!

 

 

 

 

Dimitar
Telerik team
 answered on 01 Nov 2016
1 answer
149 views

The original grid was a standard item grid.  After the item number was entered, I did a dgvItems.RefreshEdit() to commit the change and make the new row accessible.

The telerick datagrid does not have the RefreshEdit() function and I have not been able to find an equivalent function.  When I access e.RowIndex or dgvItems.CurrentRow.Index, it returns -1.  In addition, if I try to access the new row, I get an index out of range error.

What is the proper method for the row index so that it does not return -1.

 

 

 

Dimitar
Telerik team
 answered on 01 Nov 2016
1 answer
177 views

Hi,

 

Can a control windows inherit the style of a theme created on builder theme? On my Visual Studio project I have got to use radcontrols which inherit the style of a specified theme.

The reason is that I would like to create a controls library to asign them some properties and methods. However I would like to apply to these controls a telerik style.

Some idea about how to do it??

Thanks

Angel

Dimitar
Telerik team
 answered on 31 Oct 2016
1 answer
132 views
Is there anyway to show a label text as engraved or embossed?
Hristo
Telerik team
 answered on 28 Oct 2016
1 answer
124 views

Hi
   I have been trying to solve my issue that the top border color is always gray but for some reason I cannot find what generates it. As you can see the border is red but the topborder is gray. Anything I am missing?

 

<UserControl HorizontalAlignment="Left" Width="371" Height="648">
 <UserControl.Resources>
        <local:radGridViewBasketData x:Key="DataSource"/>
 </UserControl.Resources>
 
 <telerik:RadGridView x:Name="radGridViewBasket" Background="Transparent" BorderBrush="Red" BorderThickness="1"
                                         HorizontalAlignment="Left" Width="371" Margin="0,3,0,3"
                                         RowIndicatorVisibility="Collapsed" ShowColumnHeaders="False"
                                         AutoGenerateColumns="False" ShowGroupPanel="False">
<!-- stuff -->
        </telerik:RadGridView>
</UserControl>

 

Stefan Nenchev
Telerik team
 answered on 28 Oct 2016
6 answers
245 views

I seem to have a problem with changing my datasource.

I have 2 Objects: One with InvoiceLines made up of the following properties: int id, int index, string name and Order order

My Order object is made up of the following properties: int id and string name.

The goal is to be able to select, per InvoiceLine, a corresponding Order by selecting an Order with a combobox. the comboboxcolumn is created via this code: 

gvTest.Columns.Add(new GridViewComboBoxColumn { HeaderText = "Order name", FieldName = "Order", DataSource = orderLines, DisplayMember = "Order.Name", ValueMember = ""});

problem is that when running the form, in the Combobox column, the first thing showed is: GridViewTets.Models.Order (which should be the name of the Order) and when selecting another object Order in the combobox and confirming the edit an errorbox shows with this message translated from dutch: an object of type System.String cannot be cast to type GridViewTest.Models.Order.

Dimitar
Telerik team
 answered on 28 Oct 2016
4 answers
263 views

DropDownList GotFocus Event is not being fired. When I Change the property DropDownStyle to DropDownList then it is being fired.

The Scenario is I have a form, in it's load event i am binding the events which are lying on some other file with different fields. Events are GotFocus and Lost Focus  to behave identically when control got focus or lost focus, i made a common event handler and bind that handle with all fields on form load time. all fields are working well but DropDownList control works only when i change its DropDownStyle property to DropDownList. 

 I dont know why its behaving like this did i miss something ??

Dimitar
Telerik team
 answered on 28 Oct 2016
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?