Telerik Forums
UI for WinForms Forum
3 answers
372 views
I'm trying to set up a ListView with two groups that allows the user to:

1. Drag and Drop items within the first group only.  The user can sequence (non-group) items in that part of the list.  Only one item at a time should be dragged/dropped.  (The drag/drop example I found on the forum doesn't work well with groups.  It removes items.  But it works well if I eliminate my groups.)

2. Double click an item to move it from its current group to the other group.  I got this much code to work.  What I need to work out still is to prevent double-clicking on a group item from expanding/collapsing that group.

private void lvMain_DoubleClick(object sender, EventArgs e)
{
    if (lvMain.SelectedItem.GetType() == typeof(ListViewDataItem))
    {
        if (lvMain.SelectedItem.Group == lvMain.Groups[0])
        {
            lvMain.SelectedItem.Group = lvMain.Groups[1];
        }
        else
        {
            lvMain.SelectedItem.Group = lvMain.Groups[0];
        }
    }
}

Thank you,
Gary
Peter
Telerik team
 answered on 16 May 2013
6 answers
260 views
Im new bie in Telerik Winform.
I want to create ListView like Google Talk list user same as:

http://www.mediafire.com/view/?1mo7uemelr0fn1d

Who can give me simple project demo, please!!!! Thanks in advance!!!
Stefan
Telerik team
 answered on 16 May 2013
4 answers
145 views
Hi,

I am designing a purchase order form and using a GridView to input the order. I have an insert, remove row, and a submit buttons. The idea is that the user will click on insert a new row, enter data, insert a row, enter data, etc

once the user has added the items to the grid I need to reiterate through the grid and insert the data row by row into an SQL database. I can insert the current row but not sure how to reiterate through the grid using For each row, etc

Any advice is much appreciated.

Regards,

John


private void radButtonSubmitOrder_Click(object sender, EventArgs e)
    {
        SqlConnection conn = new SqlConnection();
 
        dataModel dbstring = new dataModel();
 
        conn.ConnectionString = dbstring.getDBConnString();
        conn.Open();
 
        string _insertData = "insert into Items(FormID,Item,Description,UnitsOrdered,UnitCost) values (@FormID,@Item,@Description,@UnitsOrdered,@UnitCost)";
 
        try
        {
            SqlCommand cmd = new SqlCommand(_insertData, conn);
 
                
            cmd.Parameters.Add("@FormID", SqlDbType.Int);
            cmd.Parameters.Add("@Item", SqlDbType.Text);
            cmd.Parameters.Add("@Description", SqlDbType.Text);
            cmd.Parameters.Add("@UnitsOrdered", SqlDbType.Int);
            cmd.Parameters.Add("@Unitcost", SqlDbType.Money);
    
             
            cmd.Parameters["@FormID"].Value = "567891";
            cmd.Parameters["@Item"].Value = this.radGridView1.CurrentRow.Cells[0].Value;
            cmd.Parameters["@Description"].Value = this.radGridView1.CurrentRow.Cells[1].Value;
            cmd.Parameters["@UnitCost"].Value = this.radGridView1.CurrentRow.Cells[2].Value;
            cmd.Parameters["@UnitsOrdered"].Value = this.radGridView1.CurrentRow.Cells[3].Value;
       
    
            cmd.ExecuteNonQuery();
        }
        catch (System.Data.SqlClient.SqlException sqlException)
        {
            // Write error to Debug output stream
            System.Diagnostics.Debug.Write(sqlException.Message);
        }
 
        finally
        {
            conn.Close();
 
        }
 
    }
John
Top achievements
Rank 1
 answered on 16 May 2013
1 answer
283 views
Hi,

We are using .NET framework as 4.0 with c# window application.We want below functionalities into the grid :
1) Parent & child grid (multiple bands)
2) Formatting :
     (a) copy data from any source (like mirosoft word) to grid column, its formatting(bold,italic,underline,font size,color etc) should not change and user should be able to save same data with same formatting into database i.e while retrieving same data from database to display into grid, it should display into same format (bold,italic,underline,font size,color etc)
(b) There can be multiple buttons on window form screen like (bold,italic,underline,font size,color etc) .
      User can select multiple row(s)/column(s)/single column of a row from grid and click on any button.Format should be apply on all 
       selected row(s)/column(s) .
(c) User can select some text from single column of a row and click on any button of the screen (like bold,italic,underline,font size,color etc).Formatting should be apply only on selected text

3) Automatic sorting,filtering ,grouping and hiding/unhiding the columns without writing any extra heavy code
4) Developer should be able to create all type of column (like checkbox,dropdown,editable/non-editable column etc ) by chaging the property of column without writing any extra heavy code
5) EditorControl property should be applicable for all column i.e. if there is date column in grid and user click on it.Calander should be display .Developer should be able to do this without writing any extra heavy code
6) show week no in calender control

Please let me know which abobe functionalities can be implemented/ not implemented by using telerik grid ?

Anton
Telerik team
 answered on 16 May 2013
5 answers
134 views
I was not able to find a concise listing of the Appointments table mappings. So, after hours of trial and error and searching through the help and forums I came up with my own documentation. I'm sharing it here in the hopes that others will not have to spend so much time to figure this out. I'm sure Telerik can clarify and fill in the missing information. The formatting of this didn't come out so well so I am also including a screen shot.
Appointment Property Data Type Length Example Data Notes
Start datetime 01/1/2013 12:00:00
End datetime 01/1/2013 13:00:00
Duration time 7 01:00:00 Can this be set to a datetime in older databases?
Summary nvarchar 255 Lunch with Steve Corresponds to Subject
Description ntext On the corner of 5th and Main Corresponds to the large textbox without a label (i.e. details, etc.)
Location nvarchar 255 Tony Roma's
Visible bit/boolean 1/True
AllDay bit/boolean 0/False I would expect this to be associated with the All Day checkbox but it's always null in the database
AllowDelete bit/boolean 1/True
AllowEdit bit/boolean 1/True
UniqueID int/uniqueidentifier 5  /  6706202d-ca29-40bc-81ab-b2a405c9e929 I'm not sure what this field is for. Maybe if you don't have Auto-Increment or Row GUID set to true it creates a default value for you. I know that if you do have Auto-Increment set you don't want this property pointing to that field.
BackgroundID int 1 Corresponds to Background color (i.e. category)
StatusID int 2 Corresponds to the "Show time as" drop down
RecurrenceRule nvarchar 1024 FREQ=WEEKLY;BYDAY=MO,TU,WE;WKST=SU
MasterEventID int/uniqueidentifier 5  /  6706202d-ca29-40bc-81ab-b2a405c9e929 This will contain the record id of the parent appointment if an indvidual appointment in a recurrence set has changed.
ResourceID int/uniqueidentifier 6  /  1367f9f9-e4af-4036-9821-477fd86b81bf This not on the appointments table but rather on the table that connects appointments to resources.
RecurrenceId datetime 01/1/2013 12:00:00 Not sure what the point of this field is. It appears to be the Start date/time for an appointment that is an exception of a recurrence.
Resources This is not a field on the database but rather the name of the relationship between the Appointments table and the AppointmentsResources table.
Exceptions This is not a field on the database but rather the name of the relationship between child appointment (i.e. exception) and the parent appointment (master event).

Peter
Telerik team
 answered on 15 May 2013
7 answers
761 views
Hi,

I installed the RadControls for WinForms (version: 2011.2 11.831 (Aug 31, 2011)) in my VS-2010 (Windows Vista). I upgraded the RadControls from version 2011.1 11.419. I installed the new version using the ".msi" file. After completing the the installation process, I upgrade my solution with the "Telerik | RadControls for Winforms| Upgrade Wizard" menu option and rebuild it.
When I run the application I'm receiving the following exception:

Exception Type:        System.IO.FileNotFoundException
Exception Message:     Could not load file or assembly 'Telerik.WinControls.UI, Version=2011.2.11.712, Culture=neutral, PublicKeyToken=5bb2a467cbec794e' or one of its dependencies. The system cannot find the file specified.

Any suggestions?

Thanks,

Francisco
Roxana
Top achievements
Rank 1
 answered on 15 May 2013
1 answer
90 views
hi.i want to my telerik chart use a text file as database.i mean when user drag and drop a text file on my telerik chart, the chart reform as that txt file's data.how can i do that?
Petar Kirov
Telerik team
 answered on 15 May 2013
3 answers
216 views
Dear Telerik users

I've got two questions:

1. Is it possible in "Winforms Gridview" to have a custom hierarchy as shown in the wpf example: http://demos.telerik.com/wpf/?GridView/Hierarchy/CustomHierarchy ?
or in Silverlight http://demos.telerik.com/silverlight/#GridView/Hierarchy/CustomHierarchy
I've got a list of custom objects sometimes containing a collection of objects. So I want the "+" button only to display if the objects contains subobjects.

2. If not, is it possible to hide the "+" button if a row's GetChildrows returns 0 childs? (by cellformatting?)

Greets

Markus

Ivan Petrov
Telerik team
 answered on 14 May 2013
36 answers
1.2K+ views
I'm using Q2 2009 SP1 (2009.2.9.729) release of Telerik. And have form with date time picker. When I try to select a date,it pops up with  January 1990. I want to change that user should see current mounth and year. Otherwise user has to go till the 1987 to select his birthday. I've searched on google and in this forum but unfortunately didnt find the solution.
Stefan
Telerik team
 answered on 14 May 2013
1 answer
190 views

I'm trying to bind a single row to a Telerik RadGridView in WinForms.  Since this list only ever contains one item, it seems inefficient to bind to a "List", even though I know that List only has one item. However, when I try to just bind to a single item in my list, nothing happens. Nothing shows up on my grid, but I don't get an error in the debugger.

This works. GetObjects is a Dal method that returns a List.

List<MyObject> myObjects = MyDal.GetObjects(myID); 
this.myGridView.DataSource = myObjects;

 

The following code does NOT work. GetObject is a Dal method that only returns the first element from a List.

MyObject myObject = MyDal.GetObject(myID); 
this.myGridView.DataSource = myObject;

I posted a similar question here .
Stefan
Telerik team
 answered on 14 May 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)
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?