Telerik Forums
UI for WinForms Forum
1 answer
171 views
hi 
I'm working on an application that in one part of this, we have to display physical disk content in grid for user.
we have a cache(reduce disk access and increase performance) that load 10 kilo byte of data and use it in CellValueNeeded event of radGridView1 as below

private void radGridView1_CellValueNeeded(object sender, GridViewCellValueEventArgs e)
        {
           
            try
            {
                e.Value =  cache.retriveCellElement(e.RowIndex, e.ColumnIndex);
            }
            catch
            {
                MessageBox.Show(e.RowIndex.ToString() + "  +  " + e.ColumnIndex.ToString());
            }
           
        }  
but when the rowCount of radGridView1 greater than 1000000 this is very slow and when rowCount greater than 2000000 radGridView1 doesn't show anything. is there any limit on rowCount? is there any alternative solution in this case?
Thank you in advance for your help. 


George
Telerik team
 answered on 23 Dec 2013
3 answers
258 views
Hi,

how can I adjust color of disabled button? By default image is changed to grayscale but in my program I need it to be darker.
How can I adjust it in Visual Style Builder?

Cheers,
Kuba. 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Dec 2013
1 answer
340 views
Stefan
Telerik team
 answered on 23 Dec 2013
12 answers
599 views
hello,
I am using Q2 2011 and want to have a Persian DateTimePicker but when I set RadDateTimePicker culture property to fa-Ir, an exception is thrown in this line:
this.radDateTimePicker1.Culture = new System.Globalization.CultureInfo("fa-IR");
 
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

I tried everything said in other forum threads like setting thread culture and calendar to persian :
CultureInfo info = new CultureInfo("fa-Ir");
info.DateTimeFormat.Calendar = new PersianCalendar();
Thread.CurrentThread.CurrentCulture = info;
this.radDateTimePicker1.Culture = info;

but I get the same exception at this line:
this.radDateTimePicker1.Culture = info;
 
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Then I tried another code posted in MSDN forums:
System.Globalization.CultureInfo calture = new System.Globalization.CultureInfo("fa-IR");
System.Globalization.DateTimeFormatInfo info = calture.DateTimeFormat;
info.AbbreviatedDayNames = new string[] { "ی", "د", "س", "چ", "پ", "ج", "ش" };
info.DayNames = new string[] { "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" };
info.AbbreviatedMonthNames = new string[] { "فروردین", "ارديبهشت", "خرداد", "تير", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
info.MonthNames = new string[] { "فروردین", "ارديبهشت", "خرداد", "تير", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
info.AMDesignator = "ق.ظ";
info.PMDesignator = "ب.ظ";
info.ShortDatePattern = "yyyy/MM/dd";
info.FirstDayOfWeek = DayOfWeek.Saturday;
System.Globalization.PersianCalendar cal = new System.Globalization.PersianCalendar();
 
typeof(System.Globalization.DateTimeFormatInfo).GetField("calendar", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(info, cal);
object obj = typeof(System.Globalization.DateTimeFormatInfo).GetField("m_cultureTableRecord", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(info);
obj.GetType().GetMethod("UseCurrentCalendar", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).Invoke(obj, new object[] { cal.GetType().GetProperty("ID", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(cal, null) });
typeof(System.Globalization.CultureInfo).GetField("calendar", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(calture, cal);
typeof(System.Globalization.CultureInfo).GetField("calendar", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(calture, cal);
 
System.Threading.Thread.CurrentThread.CurrentCulture = calture;
System.Threading.Thread.CurrentThread.CurrentUICulture = calture;
System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat = info;
System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat = info;

the same exception is thrown again in this line:
this.radDateTimePicker1 = new Telerik.WinControls.UI.RadDateTimePicker();
 
System.ArgumentOutOfRangeException was unhandled
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  Source=mscorlib
  ParamName=index
  StackTrace:
       at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at Telerik.WinControls.UI.MaskDateTimeProvider.SelectFirstItem()
       at Telerik.WinControls.UI.MaskDateTimeProvider.SelectFirstEditableItem()
       at Telerik.WinControls.UI.MaskDateTimeProvider..ctor(String mask, CultureInfo culture, RadMaskedEditBoxElement owner)
       at Telerik.WinControls.UI.RadMaskedEditBoxElement.CreateMaskProvider()
       at Telerik.WinControls.UI.RadMaskedEditBoxElement.set_Mask(String value)
       at Telerik.WinControls.UI.RadDateTimePickerCalendar.SetDateByValue(Nullable`1 date, DateTimePickerFormat formatType)
       at Telerik.WinControls.UI.RadDateTimePickerCalendar.CreateChildren()
       at Telerik.WinControls.UI.RadDateTimePickerElement.SetBehavior(RadDateTimePickerBehaviorDirector childrenDirector)
       at Telerik.WinControls.UI.RadDateTimePickerElement.CreateChildElements()
       at Telerik.WinControls.RadElement.CallCreateChildElements()
       at Telerik.WinControls.RadElement.Construct()
       at Telerik.WinControls.RadElement..ctor()
       at Telerik.WinControls.RadItem..ctor()
       at Telerik.WinControls.UI.RadDateTimePickerElement..ctor()
       at Telerik.WinControls.UI.RadDateTimePicker.CreateChildItems(RadElement parent)
       at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CreateChildItems(RadElement parent)
       at Telerik.WinControls.RadControl.ComponentOverrideElementTree.CreateChildItems(RadElement parent)
       at Telerik.WinControls.RadControl.Construct()
       at Telerik.WinControls.RadControl..ctor()
       at Telerik.WinControls.UI.RadDateTimePicker..ctor()
       at test.Form1.InitializeComponent() in C:\Users\Arash\Desktop\New folder\test\test\Form1.Designer.cs:line 32
       at test.Form1..ctor() in C:\Users\Arash\Desktop\New folder\test\test\Form1.cs:line 43
       at test.Program.Main() in C:\Users\Arash\Desktop\New folder\test\test\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:


I couldn't find anyhting on the net and I'm stuck with a Persian Date picker!

please help me
Stefan
Telerik team
 answered on 23 Dec 2013
2 answers
183 views
How do I disable "Make New Folder" button in RadBrowseEditor dialog? Also, I want to re-size the dialog on user preference, How do I achieve this?
Stefan
Telerik team
 answered on 23 Dec 2013
3 answers
166 views
I'm sure there's already an answer to my question in the forum, but I haven't been able to locate one:

In a WinForms project I'm using an entity framework entity that represents a table of invoice data: Project_ID, Principal, Interest, etc. Since I'm using an entity representation of a table, it doesn't include, in this case, the ProjectName located in the projects table.  I want my grid to be based on the entity to use the framework's functionality to update the table, but I want a column next to the Project_ID that displays the related ProjectName.  How can I accomplish this?

Thank you in advance for your help.

Patrick
George
Telerik team
 answered on 23 Dec 2013
3 answers
376 views
Hi,
I am looking to bind a listview with a generic list of a custom object. I got some problems trying to get the same results as in your examples. First of all when I put it on listview viewmode it show only the display member value when I was expecting it to show all column in the listview. may be I need to set something to get it work? I noticed that I can show what I want using the visualitem.text to show it the way I want but I can't find a way to do it automatically. Also I did copy your code to make the grouping work and it dosen't... I doe's make grouping when I put wrong property name in it then, the grouping seem's to be based on the count of item's. Well I would like to find a way to acheive it. May be a little project binding a custom object with grouping and differents viewmodes could help me to achieve my goal (since all your example are made with datatable).

Thanks
Dimitar
Telerik team
 answered on 23 Dec 2013
3 answers
140 views

Hi

I am using the WinForms RadGridView control in a project. I have achieved full CRUD with all the desired behaviours with one exception, that is when the user adds a row via the 'Click here to add a new row' line at the top of the grid the row is added fine, however the new row is not the currently selected row. On a larger data grid this often is off screen.



I can achieve it with a bit of a mash, but I'm sure that is not correct!



How do I make the newly added row the currently selected row?



Regards



Chris

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Dec 2013
3 answers
207 views
Say you have a GridView whose first column is a GridViewMultiComboBoxColumn.

When the grid is first activated, the cell belonging to this column in the first row becomes the active cell, but the dropdown arrow button does not display.  You need to click on the cell before the dropdown button is shown. 

Is there some trick to get the arrow button to display as soon as this cell (or any other cell belonging to the GridViewMultiComboBoxColumn  column) is first activated?

Thanks.



Stefan
Telerik team
 answered on 21 Dec 2013
1 answer
151 views
Hello people,

I have a Gridview with a column multicombobox can load it correctly, but I want to start the program that she got given initial value.

How do I have an initial default value for this combobox in the grid?

Thank you.
Stefan
Telerik team
 answered on 21 Dec 2013
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?