Telerik Forums
UI for WinForms Forum
1 answer
145 views
Hi,

I want display two items in the radcombobox one below the other. Id in the first line and address in the next line. And also I am making loading of the combobox OnDemand. How to display the radcombo box items in different lines?

Thanks in advance,
Medac
Nick
Telerik team
 answered on 19 Feb 2009
3 answers
214 views
Hi,

VS2005
WinControls 2008Q3 1204

I get a null pointer exception when right clicking on a grid outside the rows. 

I think I found the bug, if I set the selectionmode to cellselect it works fine.

            if (this.GridControl.MultiSelect && this.GridControl.SelectionMode == GridViewSelectionMode.FullRowSelect)
            {
                if (!row.IsSelected)
                {
                    this.GridControl.SelectedRows.Clear();
                }
            }

01:05:54:735 10 Exception .... Object reference not set to an instance of an object.
   at Telerik.WinControls.UI.BaseGridBehavior.OnMouseDownRight(MouseEventArgs e)
   at Telerik.WinControls.UI.BaseGridBehavior.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.UI.RadGridView.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(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 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(Int32 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.Form.ShowDialog(IWin32Window owner)

My grid:

            // 
            // radGridView
            // 
            this.radGridView.BackColor = System.Drawing.Color.Transparent;
            this.radGridView.Cursor = System.Windows.Forms.Cursors.Default;
            this.radGridView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.radGridView.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
            this.radGridView.ForeColor = System.Drawing.SystemColors.ControlText;
            this.radGridView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.radGridView.Location = new System.Drawing.Point(0, 0);
            this.radGridView.Margin = new System.Windows.Forms.Padding(0);
            // 
            // 
            // 
            this.radGridView.MasterGridViewTemplate.AllowAddNewRow = false;
            this.radGridView.MasterGridViewTemplate.AllowColumnChooser = false;
            this.radGridView.MasterGridViewTemplate.AllowColumnReorder = false;
            this.radGridView.MasterGridViewTemplate.AllowDragToGroup = false;
            this.radGridView.MasterGridViewTemplate.AllowRowResize = false;
            this.radGridView.MasterGridViewTemplate.Caption = null;
            gridViewTextBoxColumn1.FieldAlias = "FileName";
            gridViewTextBoxColumn1.FieldName = "FileName";
            gridViewTextBoxColumn1.HeaderText = "Name";
            gridViewTextBoxColumn1.HeaderTextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            gridViewTextBoxColumn1.UniqueName = "FileName";
            gridViewTextBoxColumn1.Width = 160;
            gridViewDateTimeColumn1.DataType = typeof(System.DateTime);
            gridViewDateTimeColumn1.FieldAlias = "DateCreated";
            gridViewDateTimeColumn1.FieldName = "DateCreated";
            gridViewDateTimeColumn1.HeaderText = "Date uploaded";
            gridViewDateTimeColumn1.HeaderTextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            gridViewDateTimeColumn1.SortOrder = Telerik.WinControls.UI.RadSortOrder.Ascending;
            gridViewDateTimeColumn1.UniqueName = "DateCreated";
            gridViewDateTimeColumn1.Width = 120;
            gridViewTextBoxColumn2.FieldAlias = "FileType";
            gridViewTextBoxColumn2.FieldName = "FileType";
            gridViewTextBoxColumn2.HeaderText = "Type";
            gridViewTextBoxColumn2.HeaderTextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            gridViewTextBoxColumn2.UniqueName = "FileType";
            gridViewTextBoxColumn2.Width = 110;
            gridViewTextBoxColumn3.FieldAlias = "FileSize";
            gridViewTextBoxColumn3.FieldName = "FileSize";
            gridViewTextBoxColumn3.HeaderText = "Size";
            gridViewTextBoxColumn3.HeaderTextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            gridViewTextBoxColumn3.UniqueName = "FileSize";
            gridViewTextBoxColumn3.Width = 100;
            this.radGridView.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn1);
            this.radGridView.MasterGridViewTemplate.Columns.Add(gridViewDateTimeColumn1);
            this.radGridView.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn2);
            this.radGridView.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn3);
            this.radGridView.MasterGridViewTemplate.EnableGrouping = false;
            this.radGridView.MasterGridViewTemplate.ShowRowHeaderColumn = false;
            this.radGridView.MultiSelect = true;
            this.radGridView.Name = "radGridView";
            this.radGridView.ReadOnly = true;
            this.radGridView.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.radGridView.ShowGroupPanel = false;
            this.radGridView.Size = new System.Drawing.Size(443, 401);
            this.radGridView.TabIndex = 0;
            this.radGridView.Text = "radGridView";
            this.radGridView.ThemeName = "Vista";
            ((Telerik.WinControls.UI.GridTableElement)(this.radGridView.GetChildAt(0))).CellSpacing = -1;
            ((Telerik.WinControls.UI.GridTableElement)(this.radGridView.GetChildAt(0))).DrawBorder = false;
            ((Telerik.WinControls.UI.GridTableElement)(this.radGridView.GetChildAt(0))).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            ((Telerik.WinControls.UI.GridTableElement)(this.radGridView.GetChildAt(0))).DrawFill = true;
            ((Telerik.WinControls.UI.GridTableBodyElement)(this.radGridView.GetChildAt(0).GetChildAt(1))).DrawBorder = true;
            ((Telerik.WinControls.UI.GridTableBodyElement)(this.radGridView.GetChildAt(0).GetChildAt(1))).BackColor = System.Drawing.Color.White;
            ((Telerik.WinControls.UI.GridTableBodyElement)(this.radGridView.GetChildAt(0).GetChildAt(1))).DrawFill = false;

Question. Can I have the drop down show even if there are no rows in the grid? (add row?)

thanks
-j

Nikolay
Telerik team
 answered on 19 Feb 2009
3 answers
300 views
Hello,

I have been using a radlistbox in my form and trying to display image against each record. the problem is that it takes around 7 seconds to display around 2000 records, which is very slow. in one of the article i have read that RadListBox take less than one second to load 2000 records
I am using following lineof code to add the text and image to list.


foreach (string strConnectedItem in arrTemp)

{

RadListBoxItem item = new RadListBoxItem();

if (arrConnectedDLD.Count != 0 && arrConnectedDLD.Contains(strConnectedItem))

{

//arrConnectedDLDinMasterFile.Add(strConnectedItem);

////RadListBoxItem item = new RadListBoxItem();

item.Text = strConnectedItem;

item.Image = imageListLB.Images[1]; ;

item.Value = strConnectedItem;

arrDLDList.Add(strConnectedItem +

"." + "1");

radLbDLD.Items.Add(item);

radCbDLD.Items.Add(

new RadComboBoxItem(strConnectedItem, strConnectedItem));

}

else

{

// arrNotConnectedDLD.Add(strConnectedItem);

//RadListBoxItem item = new RadListBoxItem();

item.Text = strConnectedItem;

item.Image = imageListLB.Images[0];

item.Value = strConnectedItem;

arrDLDList.Add(strConnectedItem +

"." + "0");

radLbDLD.Items.Add(item);

radCbDLD.Items.Add(

new RadComboBoxItem(strConnectedItem, strConnectedItem));

}

item.BorderThickness =

new System.Windows.Forms.Padding(1);

item.CanFocus =

true;

//item.Margin = new System.Windows.Forms.Padding(15, 0, 0, 0);

item.TextImageRelation = System.Windows.Forms.

TextImageRelation.ImageBeforeText;

item.TextSeparatorVisibility = Telerik.WinControls.

ElementVisibility.Visible;

}


if is remove the above code and instead use

radLbDLD.DataSource = arrDLDList;


then the loading time is reduced but inage is not displayed.
as per my understanding the most of the time is taken in adding item to list on by one.
is there any way by which I can avoid this looping.

Also I could not find any property in RadListBox equivalent to ListBox.Items[n].ImageIndex in .net controls
please suggest what can be done to improve the performance.

Thanks & Regards,
Vijay Chowdhary
Nick
Telerik team
 answered on 19 Feb 2009
1 answer
97 views
Hi,

I am really looking forward to trying out the Telerik Winforms controls they look amazing..

I was wondering if the skinning or theming that I have seen on the demos can be deployed on Windows Mobile devices? Are there any other ways of skinning Win Forms applications so they don't look like they were made in 1995?

Thanks in advance..

Mark
Deyan
Telerik team
 answered on 19 Feb 2009
1 answer
237 views
Hi, I have a problem with method Find in RadTreeView.Nodes

The problem is that the function Find don't match nodes.

In the next example I do three research use these proprerty :
- Key
- Tag
- Text

But the results (Count1,Count2 and Count3) are all 0.

I don't understand.

 

RadTreeView rad = new RadTreeView(); 

 

RadTreeNode node = new RadTreeNode();

 

node.Key =

"1";

 

 

node.Tag =

"2";

 

 

node.Text =

"3";

 

 

 

rad.Nodes.Add(node);

 

 

RadTreeNode[] nodes1 = rad.Nodes.Find("1", true);

 

RadTreeNode[] nodes2 = rad.Nodes.Find("2", true);

 

RadTreeNode[] nodes3 = rad.Nodes.Find("3", true);

 

 

int count1 = nodes1.Length;

 

int count2 = nodes2.Length;

 

int count3 = nodes3.Length;

 

 

lupotana
Top achievements
Rank 1
 answered on 19 Feb 2009
3 answers
307 views
Hello,

I have strange problem with RadGridView.I am programatically binding data from strongly typed DataSet.The data bound to the RadGridView depends on what has user clicked in main menu.Everything works fine except the CreateRow event fires only when two from several tables from DataSet are bound to the control.I am not able to find any reason for that.Could You please give me some help?

RowsChanged event works fine.


Jack
Telerik team
 answered on 18 Feb 2009
1 answer
148 views
Hi,

We are running with Q2 2008 edition at present and I am experiencing a sorting issue. I am binding to a List<T> which contains a date field that I want to sort in a descending direction. The sort actually works fine and the most recent dates are at the top of the grid. My problem however is that the current row remains at the bottom of the grid e.g. on the row containing the oldest date and that results in my grid when rendered being scrolled all the way to the bottom. Does anybody have any answers? Is this something that was an issue in Q2 2008?

Regards,
Mark

            radGridViewSpreadData.MasterGridViewTemplate.AutoGenerateColumns = false;

            radGridViewSpreadData.MasterGridViewTemplate.SortExpressions.Clear();

            radGridViewSpreadData.MasterGridViewTemplate.SortExpressions.Add(new GridSortField("Date", RadSortOrder.Descending));

            radGridViewSpreadData.DataSource = this.Spread;

Jack
Telerik team
 answered on 18 Feb 2009
3 answers
220 views
hi!!

I need to know how can I do in RadMultiColumnComboBox to Find a row by text (displaymember) or by value (valuemember) for next selecting it , and can you help me with an example?

thanks
Nick
Telerik team
 answered on 18 Feb 2009
3 answers
789 views
Dear All,

I am using Telerik Q3 controls.

May i know how to show a default value in the radgridview LookUpcolumn when the data was binding to that.

Thanks & Regards,
Rajesh
Jack
Telerik team
 answered on 18 Feb 2009
3 answers
192 views
Hi

How can I make an extra header line for an existing databound datagridview?
Like grouping.

/Michael
Jack
Telerik team
 answered on 18 Feb 2009
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?