Telerik Forums
UI for WinForms Forum
1 answer
70 views
I am trying to populate the MasterEvent.Exceptions for a recurring appointment.  If I make a simple time change, my exceptions show up correctly on the scheduler but I if I want to delete an occurence I cannot figure out how to specify that an exception is a deletion.  Is there some sort of identifier such as status = -1 that I can store and use to signify this so the deletions are removed from the scheduler?
Ivan Todorov
Telerik team
 answered on 20 Sep 2012
1 answer
148 views
I have added new items to the RadGridViews default context menu.
How do I handle the click events when one of the new items is clicked?
Thanks,
Stefan
Telerik team
 answered on 20 Sep 2012
3 answers
238 views
How do you set a tooltab active when selecting a document

I have two tool tabs with different details on them, and wanted to set one or the other active when I add a document to the document tab section

Private Sub radDockMain_ActiveWindowChanged(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.Docking.DockWindowEventArgs) Handles radDockMain.ActiveWindowChanged
       'This event fires when a document tab is changed
       Select Case e.DockWindow.Text
           Case "Schedule"
               MessageBox.Show("Schedule Selected")
               twSideMenu.Show()
           Case "Details"
               MessageBox.Show("Details Selected")
               'Show the Shedule tool strip
               twDetails.Show()
           Case "Today"
               MessageBox.Show("Today Selected")
           Case "Details"
               MessageBox.Show("Details Selected")
       End Select
   End Sub

Any idea how to make the tab show as currently there is no difference as I select the document the event fires, but nothing changes on the tooltabs



Nikolay
Telerik team
 answered on 20 Sep 2012
2 answers
228 views
How do I get the document tab to re display once you hit the close button for that tab.

Me.dwSearchVehicles.AllowedDockState = AllowedDockState.Docked Or AllowedDockState.Hidden
  
 Private Sub mnuSearchVehicles_Click(sender As System.Object, e As System.EventArgs) 
Handles mnuSearchVehicles.Click
        If dwSearchVehicles.DockState.Equals(DockState.Hidden) Then
            dwSearchVehicles.DockState = DockState.TabbedDocument
        End If
  
        Me.radDockMain.ActiveWindow = dwSearchVehicles
  
    End Sub

As this code does not seem to do anything. 
I can prevent the page from hiding buy changing the setting to
Me.dwSearchVehicles.AllowedDockState = AllowedDockState.Docked

But that is not the required action

Also you can easily hide the tab by coding
Me.dwSearchVehicles.AllowedDockState = AllowedDockState.Docked Or AllowedDockState.Hidden
Me.dwSearchVehicles.Hide()

but how do you get it to show up again
Denis Cilliers
Top achievements
Rank 1
 answered on 20 Sep 2012
8 answers
1.3K+ views
I need to know when the user has changed an entry in a combobox in a specific column (3, in this case), because I may need to adjust entries in another column to compensate.  The first method I tried was using the CellValueChanged event, which kind of works, but only fires after you select another grid element.  I need something that works immediately upon the value changing, but that accesses the new value.

I found some other code on the forum to handle the selected index changed event, but had to modify it slightly:

private void dataTransferRadGridView_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == 3)
                {
                    IInputEditor editor = this.dataTransferRadGridView.ActiveEditor;
                    if (editor != null)
                    {
                        if (editor.GetType() == typeof(RadDropDownListEditor))
                        {
                            RadDropDownListElement comboElement = (RadDropDownListElement)((RadDropDownListEditor)editor).EditorElement;
                            comboElement.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(comboElement_SelectedIndexChanged);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                string errorMessage = "Exception thrown in Main_MonitorConfiguration.dataTransferRadGridView_CellBeginEdit(object, GridViewCellCancelEventArgs)\nMessage: " + ex.Message;
                LogMessage.LogError(errorMessage);
#if DEBUG
                MessageBox.Show(errorMessage);
#endif
            }
        }
  
        private void dataTransferRadGridView_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == 3)
                {
                    IInputEditor editor = this.dataTransferRadGridView.ActiveEditor;
                    if (editor != null)
                    {
                        if (editor.GetType() == typeof(RadDropDownListEditor))
                        {
                            RadDropDownListElement comboElement = (RadDropDownListElement)((RadDropDownListEditor)editor).EditorElement;
                            comboElement.SelectedIndexChanged -= new Telerik.WinControls.UI.Data.PositionChangedEventHandler(comboElement_SelectedIndexChanged);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                string errorMessage = "Exception thrown in Main_MonitorConfiguration.dataTransferRadGridView_CellEndEdit(object, GridViewCellEventArgs)\nMessage: " + ex.Message;
                LogMessage.LogError(errorMessage);
#if DEBUG
                MessageBox.Show(errorMessage);
#endif
            }
        }
  
        void comboElement_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {
            try
            {
                int index = (int)(((RadDropDownListElement)sender).SelectedIndex);
                if (index > -1)
                {
                      
                    //// MessageBox.Show("Selected Index Changed. Value: " + index);
                    CorrectSlaveRegistersForAllRowEntries();
                }
            }
            catch (Exception ex)
            {
                string errorMessage = "Exception thrown in Main_MonitorConfiguration.dataTransferRadGridView_CellEndEdit(object, EventArgs-)\nMessage: " + ex.Message;
                LogMessage.LogError(errorMessage);
#if DEBUG
                MessageBox.Show(errorMessage);
#endif
            }
        }

The major change I made was to replace all instances of RadComboBoxElement with RadDropDownListElement, and RadComboBoxEditor with RadDropDownListEditor, and use the appropriate event arguments.  The code would not compile otherwise.

Original source is here.  I used the C# version, which you can see if you scroll down, as my starting point.

Since one cannot tell which row fired the event, one has to correct every row entry.  However, the big problem is that the CellEndEdit event doesn't work.  The event is firing as expected, but the value of 'editor' always ends up being null.  So, I keep assigning new copies of the event to the handler, and none are ever removed.  The fact that the events aren't being removed when changing cells is a huge problem, because the event then fires for any cell selected, not just the ones in column 3.

I'm not married to doing it this way.  All I need is some way to know that a new combobox element has been selected in a particular column, preferable also giving me the row was well, but it must give me some indication of what the new value is, either by knowing its text or by knowing its index in the combobox data set.

Any suggestions will be appreciated.
Nikolay
Telerik team
 answered on 19 Sep 2012
9 answers
789 views
Hi,
I need to know how can I enable or disable ReadOnly property of a RadGridView's row. I have CheckBox column, and I want to manage ReadOnly property of selected row with checkboxes.
Nikolay
Telerik team
 answered on 19 Sep 2012
1 answer
90 views
Hi,

    I am not able to bind the summary and detail datas into the radgridview.I am using two datatables,one is for master and another one is for detail.But i cant able to bind while expanding the grid."In the detail,i want to bind only specified columns such as Mold,Mold_pos_from,mold_pos_to,model,assembly_line_id"
Note:-
        Column Model and Assembly_Line_id must be combo box

I attached my code below:-

  Private Sub CBSEARCH_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CBSEARCH.Click
        Try
            intFlag = 1
            Grid_Combo_load()
            dsCastPlan = retrieveData()           
            Grid_Property(1)
            setColumn(dsCastPlan)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
   
     Private Sub Grid_Property(ByVal add_New As Integer)
        'Grid_Combo_load()
        Me.gvBarcodeGen.HorizontalScrollState = Telerik.WinControls.UI.ScrollState.AlwaysShow
        'Grouping()
        'row_summary(add_New)
        'gv_CPS.GroupDescriptors.Expression = "Cast Area"
        gvBarcodeGen.AutoExpandGroups = True
        gvBarcodeGen.GroupExpandAnimationType = Telerik.WinControls.UI.GridExpandAnimationType.Slide
        gvBarcodeGen.EnableSorting = True
        gvBarcodeGen.EnableGrouping = True
        gvBarcodeGen.ShowFilteringRow = False
        'Filter section
        gvBarcodeGen.EnableFiltering = False
        gvBarcodeGen.ShowGroupPanel = False
        gvBarcodeGen.AllowColumnResize = True
        gvBarcodeGen.MasterTemplate.ShowHeaderCellButtons = True
        gvBarcodeGen.MasterTemplate.ShowFilteringRow = False
        'gv_CPS.BestFitColumns()
    End Sub
    Private Sub setColumn(ByVal dscastplan As DataSet)
        Try
         
            Me.gvBarcodeGen.DataSource = dscastplan.Tables(0)          

            Dim childTemplate1 As New GridViewTemplate()
          
            childTemplate1.DataSource = dscastplan.Tables(1)

            childTemplate1.Columns("Mold").Width = 100
            childTemplate1.Columns("Mold").WrapText = True

            childTemplate1.Columns("mold_pos_from").Width = 100
            childTemplate1.Columns("mold_pos_from").WrapText = True

            childTemplate1.Columns("mold_pos_to").Width = 100
            childTemplate1.Columns("mold_pos_to").WrapText = True

            childTemplate1.Columns("Model").Width = 100
            childTemplate1.Columns("Model").WrapText = True

            'childTemplate1.Columns("Caster").Width = 100
            'childTemplate1.Columns("Caster").WrapText = True

            childTemplate1.Columns("assembly_line_id").Width = 100
            childTemplate1.Columns("assembly_line_id").WrapText = True

            childTemplate1.Columns("Status").Width = 100
            childTemplate1.Columns("Status").WrapText = True         

            Me.gvBarcodeGen.MasterTemplate.Templates.Add(childTemplate1)

            Dim relation1 As New GridViewRelation(Me.gvBarcodeGen.MasterTemplate)
            relation1.RelationName = "BenchMold_MoldPosition"
            relation1.ParentColumnNames.Add("bench_id")
            relation1.ChildColumnNames.Add("bench_id")
            relation1.ChildTemplate = childTemplate1
            Me.gvBarcodeGen.Relations.Add(relation1)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub
   
    Private Sub Grid_Combo_load()

        gvBarcodeGen.Columns.Clear()
        gvBarcodeGen.AutoGenerateColumns = False

        Dim BENCH As New GridViewTextBoxColumn
        BENCH.Name = "bench"
        BENCH.HeaderText = "BENCH"
        BENCH.FieldName = "bench"
        BENCH.Width = 100
        BENCH.ReadOnly = True
        gvBarcodeGen.Columns.Add(BENCH)

        Dim SHIFT As New GridViewTextBoxColumn()
        SHIFT.Name = "shift_num"
        SHIFT.HeaderText = "SHIFT NUM"
        SHIFT.FieldName = "shift_num"
        SHIFT.Width = 100
        SHIFT.ReadOnly = True
        gvBarcodeGen.Columns.Add(SHIFT)

        'Dim BENCH As New GridViewComboBoxColumn()
        'BENCH.Name = "BENCH"
        'BENCH.HeaderText = "BENCH"
        'BENCH.DataSource = objCom.Dynamic_Combo_load("bench_id", "Name", "T_SFS_MAS_BENCH ORDER BY NAME")
        'BENCH.ValueMember = "bench_id"
        'BENCH.DisplayMember = "Name"
        'BENCH.FieldName = "BENCH"
        'BENCH.Width = 100
        'BENCH.ReadOnly = True
        'gvBarcodeGen.Columns.Add(BENCH)

        'Dim MoldCombo As New GridViewComboBoxColumn()
        'MoldCombo.Name = "MOLD NAME"
        'MoldCombo.HeaderText = "MOLD NAME"
        ''MoldCombo.DataSource = objCom.Dynamic_Combo_load("cast(mold_type_id as varchar(100)) as mold_type_id", "Name", "T_SFS_MOLD_TYPE ORDER BY NAME")
        'MoldCombo.DataSource = objCom.Dynamic_Combo_load("mold_type_id", "Name", "T_SFS_MOLD_TYPE ORDER BY NAME")
        'MoldCombo.ValueMember = "mold_type_id"
        'MoldCombo.DisplayMember = "Name"
        'MoldCombo.FieldName = "MOLD NAME"
        'MoldCombo.Width = 100
        ''MoldCombo.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        'gvBarcodeGen.Columns.Add(MoldCombo)

        Dim NUM_INSTALLED As New GridViewTextBoxColumn()
        NUM_INSTALLED.Name = "num_installed"
        NUM_INSTALLED.HeaderText = "NUM INSTALLED"
        NUM_INSTALLED.FieldName = "num_installed"
        NUM_INSTALLED.Width = 100
        NUM_INSTALLED.ReadOnly = True
        gvBarcodeGen.Columns.Add(NUM_INSTALLED)

        Dim START_BARCODE As New GridViewTextBoxColumn()
        START_BARCODE.Name = "start_barcode"
        START_BARCODE.HeaderText = "START BARCODE"
        START_BARCODE.FieldName = "start_barcode"
        START_BARCODE.Width = 100
        START_BARCODE.ReadOnly = True
        gvBarcodeGen.Columns.Add(START_BARCODE)

        Dim END_BARCODE As New GridViewTextBoxColumn()
        END_BARCODE.Name = "end_barcode"
        END_BARCODE.HeaderText = "END BARCODE"
        END_BARCODE.FieldName = "end_barcode"
        END_BARCODE.Width = 100
        END_BARCODE.ReadOnly = True
        gvBarcodeGen.Columns.Add(END_BARCODE)

        Dim STATUS As New GridViewTextBoxColumn()
        STATUS.Name = "status"
        STATUS.HeaderText = "STATUS"
        STATUS.FieldName = "status"
        STATUS.Width = 100
        STATUS.ReadOnly = False
        gvBarcodeGen.Columns.Add(STATUS)

 

        Dim MOLD As New GridViewTextBoxColumn()
        MOLD.Name = "Mold"
        MOLD.HeaderText = "MOLD"
        MOLD.FieldName = "Mold"
        MOLD.Width = 100
        MOLD.ReadOnly = False
        ' Me.gvBarcodeGen.MasterTemplate.Templates.Add(childTemplate1)
        gvBarcodeGen.MasterTemplate.Columns.Add(MOLD)

 

 

    End Sub
     Private Sub drawCastPlanDetTable()
        Try

            dtCastPlan_New_0.Columns.Clear()           
            dtCastPlan_New_0.Columns.Add("bench_id", GetType(Integer))
            dtCastPlan_New_0.Columns.Add("bench", GetType(String))          
            dtCastPlan_New_0.Columns.Add("num_installed", GetType(Integer))          
            dtCastPlan_New_0.Columns.Add("assembly_line_id", GetType(Integer))         
            dtCastPlan_New_0.Columns.Add("shift_num", GetType(String))
            dtCastPlan_New_0.Columns.Add("cavity", GetType(Integer))         
            dtCastPlan_New_0.Columns.Add("start_barcode", GetType(String))
            dtCastPlan_New_0.Columns.Add("end_barcode", GetType(String))
            dtCastPlan_New_0.Columns.Add("status", GetType(Integer))         
            dtCastPlan_New_0.Columns.Add("Status_Description", GetType(String))

            dtCastPlan_Det_0.Columns.Clear()          
            dtCastPlan_Det_0.Columns.Add("bench_id", GetType(Integer))
            dtCastPlan_Det_0.Columns.Add("bench", GetType(String))
            dtCastPlan_Det_0.Columns.Add("mold_type_id", GetType(Integer))
            dtCastPlan_Det_0.Columns.Add("Position", GetType(Integer))          
            dtCastPlan_Det_0.Columns.Add("cavity", GetType(Integer))         
            dtCastPlan_Det_0.Columns.Add("Mold", GetType(String))
            dtCastPlan_Det_0.Columns.Add("model", GetType(String))
            dtCastPlan_Det_0.Columns.Add("assembly_line_id", GetType(Integer))
            dtCastPlan_Det_0.Columns.Add("shift", GetType(Integer))

            dtCastPlan_Det_0.Columns.Add("mold_pos_from", GetType(Integer))
            dtCastPlan_Det_0.Columns.Add("mold_pos_to", GetType(Integer))
            dtCastPlan_Det_0.Columns.Add("barcode", GetType(String))
            dtCastPlan_Det_0.Columns.Add("status", GetType(Integer))
          
            dtCastPlan_Det_0.AcceptChanges()
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

Private Function retrieveData(Optional ByVal Flag As Integer = 0) As DataSet
        Try
           
            drawCastPlanDetTable()

            dtCastPlan_New = objclsBarcodeGen.getPlanningData(RadDateTimePicker1.Value, Convert.ToInt32(ddlBench.SelectedValue), Convert.ToInt32(txtShiftFrom.Text), Convert.ToInt32(txtShiftTo.Text), Convert.ToInt32(ddlProcessOwner.SelectedValue), Flag)

            dtCastPlan_New.Columns.Add("Status_Description", GetType(String))

            Dim drValid As DataRow()
            Dim drValid0 As DataRow()
            Dim drNew As DataRow

            dtCastPlan_New_0 = dtCastPlan_New.Clone
            For cnt As Integer = 0 To dtCastPlan_New.Rows.Count - 1
                drValid = dtCastPlan_New.Select("Bench_id=" & dtCastPlan_New.Rows(cnt).Item("Bench_id") & " and shift_num=" & dtCastPlan_New.Rows(cnt).Item("shift_num") & "")
                If drValid.Length > 0 Then
                    If Not dtCastPlan_New_0.Rows.Count > 0 Then
                        drNew = dtCastPlan_New_0.NewRow
                        drNew("bench_id") = drValid(0).Item("bench_id")
                        drNew("bench") = drValid(0).Item("bench")                      
                        drNew("num_installed") = drValid(0).Item("num_installed")                      
                        drNew("assembly_line_id") = drValid(0).Item("assembly_line_id")                    
                        drNew("shift_num") = drValid(0).Item("shift_num")
                        drNew("cavity") = drValid(0).Item("cavity")
                        drNew("start_barcode") = drValid(0).Item("start_barcode")
                        drNew("end_barcode") = drValid(0).Item("end_barcode")
                        drNew("status") = drValid(0).Item("status")                      
                        drNew("Status_Description") = String.Empty
                        dtCastPlan_New_0.Rows.Add(drNew)
                    Else
                        drValid0 = dtCastPlan_New_0.Select("Bench_id=" & dtCastPlan_New.Rows(cnt).Item("Bench_id") & " and shift_num=" & dtCastPlan_New.Rows(cnt).Item("shift_num") & "")
                        If Not drValid0.Length > 0 Then
                            drNew = dtCastPlan_New_0.NewRow                          
                            drNew("bench_id") = drValid(0).Item("bench_id")
                            drNew("bench") = drValid(0).Item("bench")                           
                            drNew("num_installed") = drValid(0).Item("num_installed")                          
                            drNew("assembly_line_id") = drValid(0).Item("assembly_line_id")                         
                            drNew("shift_num") = drValid(0).Item("shift_num")
                            drNew("cavity") = drValid(0).Item("cavity")
                            drNew("start_barcode") = drValid(0).Item("start_barcode")
                            drNew("end_barcode") = drValid(0).Item("end_barcode")
                            drNew("status") = drValid(0).Item("status")                         
                            dtCastPlan_New_0.Rows.Add(drNew)
                        End If
                    End If
                End If

            Next
            dtCastPlan_New_0.AcceptChanges()

            Dim drChild As DataRow

            For iChdCnt As Integer = 0 To dtCastPlan_New.Rows.Count - 1

                For iCavityCnt As Integer = 1 To dtCastPlan_New.Rows(iChdCnt).Item("cavity")
                    drChild = dtCastPlan_Det_0.NewRow                   
                    drChild("bench_id") = dtCastPlan_New.Rows(iChdCnt).Item("bench_id")
                    drChild("bench") = dtCastPlan_New.Rows(iChdCnt).Item("bench")
                    drChild("mold_type_id") = dtCastPlan_New.Rows(iChdCnt).Item("mold_type_id")
                    drChild("Position") = dtCastPlan_New.Rows(iChdCnt).Item("mold_position")                   
                    drChild("cavity") = iCavityCnt                   
                    drChild("Mold") = dtCastPlan_New.Rows(iChdCnt).Item("Mold")
                    drChild("model") = dtCastPlan_New.Rows(iChdCnt).Item("model")
                    drChild("assembly_line_id") = dtCastPlan_New.Rows(iChdCnt).Item("assembly_line_id")
                    drChild("shift") = dtCastPlan_New.Rows(iChdCnt).Item("shift_num")
                    drChild("mold_pos_from") = 0
                    drChild("mold_pos_to") = 0
                    drChild("barcode") = String.Empty
                    drChild("status") = DBNull.Value                 
                    dtCastPlan_Det_0.Rows.Add(drChild)
                Next

            Next

            dtCastPlan_Det_0.AcceptChanges()

            Dim intInstallMold, intMoldPosFrm, intMoldPosTo As Integer
            Dim drInstallValid As DataRow()
            For iRowCnt As Integer = 0 To dtCastPlan_New_0.Rows.Count - 1
                intInstallMold = 0
                intMoldPosFrm = 1
                intMoldPosTo = 1

                drInstallValid = dtCastPlan_New.Select("Bench_id=" & dtCastPlan_New_0.Rows(iRowCnt).Item("Bench_id") & " and shift_num=" & dtCastPlan_New_0.Rows(iRowCnt).Item("shift_num") & "")
                If drInstallValid.Length > 0 Then
                    For i As Integer = 0 To drInstallValid.Length - 1
                        intInstallMold = intInstallMold + drInstallValid(i).Item("num_installed")
                        intMoldPosTo = intMoldPosTo + i
                    Next
                    dtCastPlan_New_0.Rows(iRowCnt).Item("num_installed") = intInstallMold
                    dtCastPlan_New_0.Rows(iRowCnt).Item("mold_pos_from") = intMoldPosFrm
                    dtCastPlan_New_0.Rows(iRowCnt).Item("mold_pos_to") = intMoldPosTo
                End If
            Next
            dtCastPlan_New_0.AcceptChanges()

            dsCastPlan.Tables.Clear()
            dsCastPlan.Tables.Add(dtCastPlan_New_0)
            dsCastPlan.Tables(0).TableName = "BenchMold"
            dsCastPlan.Tables.Add(dtCastPlan_Det_0)
            dsCastPlan.Tables(1).TableName = "MoldPosition"

            lblLastBarcode.Text = objclsBarcodeGen.getLastBarcode()
            Return dsCastPlan
        Catch ex As Exception
            Throw ex
        End Try
    End Function




Pls help me
Stefan
Telerik team
 answered on 19 Sep 2012
2 answers
105 views
Is there a right click/context menu available for the Rich text box?  If so where can I find the documentation?

Alan
Chris Ward
Top achievements
Rank 1
 answered on 18 Sep 2012
3 answers
122 views
Hi there,

I must be missing something but I cannot get my data elements to bind.

My code is quite straightforward.

I have two data readers :

Dim myCommand1 As New System.Data.SqlClient.SqlCommand("prcAccess_GetHeaderTransactionList", myConnection1)
myCommand1.CommandType = System.Data.CommandType.StoredProcedure
myConnection1.Open()
Dim myreader1 As SqlDataReader = myCommand1.ExecuteReader()

Dim myCommand3 As New System.Data.SqlClient.SqlCommand("prcAccess_GetDetailTransactionListByAccountNo", myConnection3)
myCommand3.CommandType = System.Data.CommandType.StoredProcedure
myConnection3.Open()
Dim myreader3 As SqlDataReader = myCommand3.ExecuteReader()


The first has a field "ST_ORDER_NUMBER" the second has one called "OH_ORDER_NUMBER"

I use the following code to bind and relate :

RadGridView3.DataSource = myreader1
Dim template As New GridViewTemplate()
template.DataSource = myreader3
RadGridView3.MasterTemplate.Templates.Add(template)
Dim relation As New GridViewRelation(RadGridView3.MasterTemplate)
relation.ChildTemplate = template
relation.RelationName = "OrderNumber"
relation.ParentColumnNames.Add("ST_ORDER_NUMBER")
relation.ChildColumnNames.Add("OH_ORDER_NUMBER")
RadGridView3.Relations.Add(relation)


Everything looks ok. But the the detail items are not displaying.

What am I missing?

Cheers

Tox
Anton
Telerik team
 answered on 18 Sep 2012
1 answer
180 views
Hi,

I am using v.2012.2.726.40 and note there are a number of other queries regarding memory allocation with RadDock on here but can't find anything that quite matches my question.

I have a RadDock control that contains DockWindows. These are left as default except CloseAction is DockWindowCloseAction.CloseAndDispose

The problem I am experiencing is when I close any window via the drop down menu on the RadDock (Close, Close All But This, Close This) the tab closes, the Closing and Closed events are fired (which perform some bespoke clean up) and the memory for the window is released. When I close the window by clicking the "x" on the window, again the Closing and Closed events fire, however the memory is does not appear to be released.

I am unable to trace any difference between the two operations, so could you let me know whether the close is performed any differently depending on whether initiated from the menu or the close icon?

Many thanks,

Mark.
Ivan Todorov
Telerik team
 answered on 18 Sep 2012
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?