Telerik Forums
UI for WinForms Forum
1 answer
528 views
Hey everyone, hope you can help with this request because I don't know how to quite word it correctly, but I'm going to try my best.

I'm wondering if there is a way to code the combo box so that when a user selectes a value...and the box closes again, If you reopen the box, the selected value is either at the top or bottom of the list?  

for example lets say your drop down contains the following:

1
2
3 Selected Value
.
.
.
.
20

And then you select 3.   The drop down will close with that value selected, and then if you click to drop down again, your list now looks like this:


3 Selected Value
4
5
6
7
8
.
.
.


Same in reverse, so like if 6 was selected, then it would look like this:

1
2
3
4
5
6 selected value.


I hope that kinda makes sense.

Thanks.
Deyan
Telerik team
 answered on 01 Sep 2009
1 answer
175 views
Hello,

Using Q1 2009 Demos...  
When we add a new row to the  child grid, the same value is updated in the last row.
When I click the right button on that row, an error appears.

--------------------------------------------------------
System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
   en Telerik.WinControls.UI.GridViewCellInfo.get_CellElement()
   en Telerik.WinControls.UI.GridDataCellElement.MergeMenus(IContextMenuManager contextMenuManager, Object[] parameters)
   en Telerik.WinControls.UI.GridViewContextMenuManager.ShowContextMenu(IContextMenuProvider contextMenuProvider)
   en Telerik.WinControls.UI.BaseGridBehavior.OnContextMenu(MouseEventArgs e)
   en Telerik.WinControls.UI.BaseGridBehavior.OnMouseDownRight(MouseEventArgs e)
   en Telerik.WinControls.UI.BaseGridBehavior.OnMouseDown(MouseEventArgs e)
   en Telerik.WinControls.UI.RadGridView.OnMouseDown(MouseEventArgs e)
   en System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   en Telerik.WinControls.RadControl.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
--------------------------------------------------------

Note: For the first child grid this not happen.

Regards
Phenicy
Jack
Telerik team
 answered on 01 Sep 2009
1 answer
132 views
Hello,
Why when I change gridViewTemaplate1 name to for example gridViewTemplateMachinesEvents in designer, after a while designer changes it back to gridViewTemaplate1. How can change gridViewTemplate name for good? When I have more templates it's to know which one to use.
Jarek
Jack
Telerik team
 answered on 01 Sep 2009
2 answers
491 views
Hey everyone.

I am upgrading my skills into winform development from asp.net and need a little help....I think asp.net is much easier when it comes to grids and data layout....but hey its only early days.

I have created a grid and I am wanting to add a couple of buttons to the right of the actual data however I am struggling...I dont want to use standard buttons I want to use images and have an onclick event on each of them.

My binding class looks like this

 public ItemDetail(int itemID, string itemDescription, int itemsRequired)  
        {  
            ItemID = itemID;  
            itemDescription = itemDescription;  
            ItemsRequired = ItemsRequired;  
        }  
        public int ItemID { getset; }  
        public string ItemDescription { getset; }  
        public int ItemsRequired { getset; } 

Within my win form I have this

  public List<ItemDetail> _itemDetails = new List<ItemDetail>();  
 
 
       
        public MainForm()  
        {  
            InitializeComponent();  
       
 
            BindItems();  
             
          
             
        }  

private

 

void BindItms()

 

{

gridItems.DataSource = _itemDetails;

 

GridViewCommandColumn addColumn = new GridViewCommandColumn();

 

addColumn.DefaultText =

"Hello";

 

 

RadDataGridViewButtonColumn buttonColumn = new RadDataGridViewButtonColumn();

 

buttonColumn.Text =

"Press Me";

 

 

 

this.gridItems.Columns.Add(addColumn);

 

 

this.gridItes.CommandCellClick += new CommandCellClickEventHandler(gridItems_CommandCellClick);

 

}


 

If I run the above code it a runs fine....As you can see I have tried adding buttons....
What do I need to do to add the columns.....Ideally when I pressed either of them they would return the selected item ID i.e ItemID


Sorry if this is all asic stuff however still getting my head around win forms

Thank you for your help

Shane P
Top achievements
Rank 1
 answered on 31 Aug 2009
1 answer
126 views
How to remove inner grid header?
Robert
Top achievements
Rank 1
 answered on 31 Aug 2009
1 answer
141 views
Hello,

I have an unbound grid with 30 columns and not more than few hundred rows. When the application is in full screen mode (grid takes almost whole screen), the grid is reacting quite slow. When using keyboard to navigate it takes up to 2 seconds to move to next cell even on a relatively fast PC (Intel Core 2 Duo, 1,86 Ghz, 2 GB RAM). It  happens only when navigating left/right, up/down works fine. I noticed that when going into edit mode then all visible rows are refreshed, then when leaving edit mode visible rows are refreshed, and finally when the focus moves to another column all visible cells are refreshed. There is quite a lot of cells to refresh and that seems to be causing the slowdowns. Is there any way to make the grid respond faster to keyboard actions (refresh only the affected cells/columns/rows) ?
I'm using Telerik Controls for WinForms (.net 2.0), tried it on 2008 Q3 SP2 and the newest demo 2009.2 729 (Jul 29, 2009)

Thanks in advance
Jack
Telerik team
 answered on 31 Aug 2009
1 answer
153 views
I have a private instance of a collection of business objects on a form.  On form load, I fill the collection with data and bind it to a treeview.  In reaction to user input elsewhere on the form, I add and remove items from the collection.  At that point I need to refresh the binding of the TreeView.  I tried resetting the DataSource property and I've tried the Refresh and Update methods, but nothing I do makes the TreeView display the new data.

How do I do this?
Victor
Telerik team
 answered on 31 Aug 2009
1 answer
172 views
I seem to have a small problem with the CellDoubleClick event with the GridView.  It seems that when I doubleclick anywhere in the header for each of the rows it processes the event.   How can a prevent this from happening?  Can the header for the GridView be disabled so that when a user doubleclicks any header it won't fire the event? 

Thanks


Victor
Telerik team
 answered on 31 Aug 2009
3 answers
167 views
How to add image column in master grid?
yaqub
Top achievements
Rank 2
 answered on 31 Aug 2009
1 answer
317 views
Hi,
Recently i have faced a problem, which surely i think u guys will hae a solution.

Scenario:
I have a gridview, a picture box and a sql database.
Procedure:
Basically, its a client information entry form which takes in data from a user and stores it in a database and then recalls it in a gridview for administrative purposes.
The userclickes the picture box and gets a picture through a fileopendialog box, which is then converted into a byte array. i have made a client class which takes in all the client information using get/set properties, the image datatype is still unsure (need a little help on that too), then there is a stored procedure written which takes this class parameters and writes them to a database.
on the administrative side a connection is made to the sql server and a reader method is used which returns all the objects in the database and generates a list based on the client class. the class is then fed directly to the gridview as a datasource.
Problems:
Firstly there are no columns defined in gridview, it just takes the returned class and populates on that basis. probelm is with the image column. can u please guide me on storing image from picture box to the database and then retreiving into the gridview.
do i need to define all columns before populating it, and/or add a image column in it. Urgent help is required please.
PictureBox image convertsto byte array.
Sql database table has a field named 'ClientImage" of datatype 'image'
SqlReader method retrieves an object only, so one has to convert back to image 
display this image with other info in gridview.
can u please help me on all these datatypes and how to show image in gridiew. it would be more helpful if i dont have to specify any columns in gridview, and directly populate from datasource.

Thanks in advance!!!!







Robert
Top achievements
Rank 1
 answered on 28 Aug 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?