Telerik Forums
UI for WinForms Forum
3 answers
185 views

Does RadGridView in Hierarchy mode supports drag drop feature? Meaning if my data
structure is as follow,

Sales Person 1 (Level One)
>>>Orders
>>>>>>Order 1 (Level Two)
>>>>>>Order 2 (level three)
>>>Region
>>>>>>Region 1
>>>>>>Region 2

Sales Person 2 (Level One)
>>>Orders
>>>>>>Order 3 (Level Two)
>>>>>>Order 4 (level three)
>>>>>>Order 5 (Level Two)
>>>Region
>>>>>>Region 3
>>>>>>Region 4
>>>>>>Region 5

Now questions,
a) Is it possible to drag “Region 3” row (from Sales Person 2) and move it under Sales Person 1 “Region” block? Similarly, “Order 1” to drag and drop under Orders of Sales Person 2?

b) Does RadGridView supports multiple drag-drop? For e.g., in above scenario, I want to drag multiple orders from Sales Person2 to Sales Person1
c) Will RadGridView support Pin column in Hierarchical form as well? Refer hierarchy above.

Best Regards,
Divyesh

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Mar 2014
1 answer
144 views
Good day

I have a gridview with predefined columns . I have a linq to sql query where i name my selected values with the same name as the predefined column names.
After i set the datasource it adds new columns to the end of the gridview.
Here is my sql query


            var res = (from s in db.SiteAudits
                       where s.SiteAuditID > 0000250 && s.SiteAuditID < 0000300
                       join ac in db.Accounts on s.AccountID equals ac.AccountID
                       join si in db.Sites on s.SiteID equals si.SiteID
                       join au in db.Audits on s.AuditID equals au.AuditID
                       select new
                       {
                         _siteauditid = s.SiteAuditID,
                         _account = ac.AccountName + "-" + si.SiteName,
                         _datedue = s.DateDue,
                         _audit = au.AuditTitle
                         
                       }).ToList();


            grd_unscheduledaudits.DataSource = res;

Is there a special way my columns should link to my query's result columns ?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Mar 2014
1 answer
127 views
Hello,

I had redundancy checking code in UserAddingRow to ensure that no row is added with duplicate key values.
However, I'm trying to add the same checking into RowChanging to ensure that no values can be changed saved into the data source that would create that invalid situation.

I am finding that RowChanging is not getting fired (breakpoint on first line in method isn't reached), and am not sure if I'm thusly doing this incorrectly.

Thanks,

Vijay
Ralitsa
Telerik team
 answered on 19 Mar 2014
1 answer
140 views
Hi,

I've tried searching for this in the documentation and forums but it may be lack of searching skills I could not find any good walkthrough.

I'm trying to achieve a design that is similar to the Zune application in Windows. The Metro theme helps me achieve most of it but the Window behaviours such as dragging the form by holding it from an empty section, and also working on a wysiwyg type of design environment doesn't seem possible.

Can someone shed more light on how this can be achieved with a few pointers?

Thanks,
George
Telerik team
 answered on 19 Mar 2014
2 answers
188 views
I have desktop alert with 2 controls
1) RadGridView (shown)
2) Panel with text area and some buttons. (hidden)

In radgridview, when i click on command button in a row, i need to show that panel with some additional info inside the text area.

So when i clicked, i have such code:
AlertControl.FixedSize = new Size(ALERT_WIDTH, _height);
_textBox.Clear();
_textBox.Text = txtMessage;

_textBox.Visible =
_btnCollapse.Enabled =
_btnNotify.Enabled =
_panelWithButtons.Visible = true;

This code works fine only when i use Hide(), this code, Show(). Have flickering here.
Without hide/show i see pretty strange thing, gridview disappear, textarea shown at top of control and height not changed (visually).

So how to invalidate without flickering, or what i can do at all here ?
George
Telerik team
 answered on 19 Mar 2014
6 answers
110 views
Hi I'm having a problem when I want change the DataSource of the control.

I want to filter in my collection depending on the first selected item, for example.

I have 3 DataTables: 1 - All People, 2 - Men, 3 - Women.
First will be charged with Table 1 - All and and depending on the first selection I make, I want to update the DataSource with 2 - Men or 3 - Women.

I encounter problems when I try to change it. I'm doing at the event SelectionChanged, I note that have selected an item and the text ends with the delimiter character, then analyze and select the text which will be my new table and to modify the datasource throws ArgumentOutOfRangeException.

private void rACBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    if (this.rACBox.Items.Count == 1 && this.rACBox.Text.EndsWith("$"))
    {
       if(this.IsMen(this.rACBox.Items[0].Value.ToString())
       {
           rACBox.AutoCompleteDataSource = new BindingSource(this.Men);
       }
       else
       {
           rACBox.AutoCompleteDataSource = new BindingSource(this.Women);
       }
    }
}

Thx
Regards.
Dimitar
Telerik team
 answered on 18 Mar 2014
3 answers
138 views
Hi,
I’m  just evaluating your great gridview control and plan to use it in my future project as grid with a list of products. It must have a insert product functionality, so I need to replace the editor of standard text column with dropdown or another editor with autocomplete functionality.
The problem is that the products in selection are more than 30000 and there is some problems with performance when a text is typed in the editor and the control do the autocomplete operation. Another problem is that I must reload the editor datasorce every time on EditorRequired/EditorInitialized event although actually there is no changes in the datasource.
So my two questions are:
Is there a better approach to achieve autocomplete with lot of (30-50k) items without so many lag when typing?
And
Is there a way to use a editor without loading the datasource every time when the editor is required?

Thanks in Advance!
Slavcho
Dimitar
Telerik team
 answered on 18 Mar 2014
3 answers
72 views
Hi,
I have a grid that I have bound my columns to a datareader.  I have 2 columns that I look at in this grid when wanting to make a custom combobox for a cell and they are "Batch Status" and "Status ID" and they are both textbox cell types.  For the column "Batch Status" I want to make it a combobox for certain cells if the "Batch Status" is "Open".

To start out I create a list array of all my combobox items.
Private mstrBatchStatusList As New List(Of ComboBoxDataSourceObject)()

Then I go ahead and use CellFormatting to make the cell a combobox if the Batch Status is "Open".
Private Sub rgvBatch_CellBeginEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles rgvBatch.CellBeginEdit
        '
        ' Got this from a website.  http://www.telerik.com/forums/dynamically-adding-controls-in-the-columns-in-the-grid
        ' The status column is a canceled Edit because I have substituted cell elements with my own elements
        ' (RadDropDownListEditorElement). In this way, I do not need to enter in edit mode and initialize the
        ' default column editor, because it is going to mess up with the new elements. I just use the elements'
        ' events to manage the change of the value and to save the cell value.
        '
        If e.Column.HeaderText = "Status" Then
            e.Cancel = True
        End If
    End Sub
    Private Sub rgvBatch_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles rgvBatch.CellFormatting
        '
        ' Edit
        '
        If e.CellElement.ColumnInfo.HeaderText = "Edit" Then
            'This is how we get the RadButtonElement instance from the cell
            Dim button As RadButtonElement = CType(e.CellElement.Children(0), RadButtonElement)
            If e.CellElement.RowInfo.Cells("Batch_Status").Value IsNot Nothing Then
                Dim title As String = e.CellElement.RowInfo.Cells("Batch_Status").Value.ToString()
                If title = "Deleted" Then
                    button.Enabled = False
                Else
                    button.Enabled = True
                End If
            End If
        End If
        '
        ' Delete
        '
        If e.CellElement.ColumnInfo.HeaderText = "Delete" Then
            'This is how we get the RadButtonElement instance from the cell
            Dim button As RadButtonElement = CType(e.CellElement.Children(0), RadButtonElement)
            If e.CellElement.RowInfo.Cells("Batch_Status").Value IsNot Nothing Then
                Dim title As String = e.CellElement.RowInfo.Cells("Batch_Status").Value.ToString()
                If title <> "Open" Or mblnReadOnly Then
                    button.Enabled = False
                Else
                    button.Enabled = True
                End If
            End If
        End If
        '
        ' Status
        '
        If TypeOf e.CellElement.RowInfo Is GridViewDataRowInfo Then
            If e.CellElement.ColumnInfo.HeaderText = "Status" Then
                If e.CellElement.RowInfo.Cells("Batch_Status").Value IsNot Nothing Then
                    Dim strBatchStatus As String = e.CellElement.RowInfo.Cells("Batch_Status").Value.ToString()
                    Dim currentStatusID As Object = e.CellElement.RowInfo.Cells("AccPac_Batch_Status_ID").Value.ToString()
                    If strBatchStatus = "Open" And Not mblnReadOnly Then
                        Dim gvDropDownList As RadDropDownListEditorElement = Nothing
                        If e.CellElement.Children.Count = 0 OrElse Not (TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement) Then
                            e.CellElement.Children.Clear()
                            gvDropDownList = New RadDropDownListEditorElement()
                            For intI = 0 To mstrBatchStatusList.Count - 1
                                gvDropDownList.Items.Add(New RadListDataItem(mstrBatchStatusList.Item(intI).MyString, mstrBatchStatusList.Item(intI).Id))
                            Next
                            e.CellElement.Children.Add(gvDropDownList)
                            '
                            ' Preset the Drop down
                            '
                            If gvDropDownList IsNot Nothing Then
                                If currentStatusID IsNot Nothing Then
                                    gvDropDownList.SelectedValue = Convert.ToInt32(currentStatusID)
                                Else
                                    gvDropDownList.SelectedIndex = -1
                                End If
                            End If
                        Else
                            gvDropDownList = DirectCast(e.CellElement.Children(0), RadDropDownListEditorElement)
                        End If

                    ElseIf e.CellElement.Children.Count > 0 AndAlso TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement Then
                        '
                        ' Make sure any cells in the status column that are not "Open" status do not get changed to a combobox
                        '
                        e.CellElement.Children.Clear()
                    End If
                End If
            ElseIf e.CellElement.Children.Count > 0 AndAlso TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement Then
                '
                ' Make sure any other columns do not get changed to a combobox
                '
                e.CellElement.Children.Clear()
            End If
        End If
    End Sub

The above code works perfectly to setting the cell to a combobox when the Batch Status is "Open" and the drop down contains the correct values that are in my list array of (mstrBatchStatusList.Item.

Here are my questions:

1.  When I want to change my combobox value to a different item in the combobox, first I need to scroll to the right since my column you can't see.  I then change my value and scroll back to the left.  I then scroll back to the right and my combobox becomes reset to the original value.  It looks like upon scrolling right it calls the CellFormating function and when it gets to this line of the code (If e.CellElement.Children.Count = 0 OrElse Not (TypeOf e.CellElement.Children(0) Is RadDropDownListEditorElement) Then) it doesn't recognize that it's currently a combobox so it resets the combo box back to the original status id.

Why does this happen and how do I get this to not happen?

2.  If there an event that can be used that triggers a combo box change event so I can check the value it's changing to and set a flag that a value changed in the grid?

Thanks
 
George
Telerik team
 answered on 18 Mar 2014
6 answers
131 views
I am currently building a theme, based on the supplied Metro. I'm pretty sure this wasn't an issue in the previous version of the Winforms controls, but under the latest version (Q1 2014), I'm having an issue with the background colour of the QuickAccess bar. 

When located in the window title, the caption bar it coloured correctly.


However, when located below the ribbon, I want the bar that goes the full length of the window to be a different shade. To achieve this, I've changed the background colour of RadRibbonBar-RadRibbonBarElement-RadRibbonBarElement. This colours the strip correctly, but unfortunately, when the QuickAccess bar goes below the ribbon there is also an artefact in the application icon.


Is this a bug or am I missing a background setting elsewhere?

Cheers
Jason
George
Telerik team
 answered on 18 Mar 2014
1 answer
96 views
hello, how can i save dates from the scheduler/reminder into my database and also set the calender in the scheduler to load the dates from my very own database in c#.
George
Telerik team
 answered on 17 Mar 2014
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?