Telerik Forums
UI for WinForms Forum
4 answers
286 views
Hi,

I'm using RadDock and I am trying to find a way within the RadDock.DockWindowClosing event handler to know if the form on the ActiveWindow has set Cancel = true in the Form.Closing handler.  I manually close the form in the DockWindowClosing handler like this:
  103             HostWindow window = dockMain.ActiveWindow as HostWindow;
  104             Form form = window.Content.FindForm();
  105             form.Close();

The form object is the correct form. There may be a reason why the form should not be closed and will set
the Cancel property to true; I can not find a way to detect this state. I really need to be able to cancel
a DockWindowClosing event based on the underlying form closing event.
How can I do this?

Thanks,
Mike



Georgi
Telerik team
 answered on 27 Aug 2009
1 answer
95 views

I the Beta Version there was an AutoDispose Property on RadDock, that was removed with 9.2 - now I assume the right way to have AutoDispose Functionality is to set the CloseAction Property on the Document or Tool Windows as needed(?).

The docs are unclear, even the introduction text mentions the AutodDispose Property, And it can be found searching the online Reference / Docs.

Regards
Erwin
Georgi
Telerik team
 answered on 27 Aug 2009
1 answer
91 views
Hello
I have a radgrid gouped by a collumn (categoryid)
I need to get the value of categoryid when the user clicks on the goup row. I tried to use currentrow, but all the cellvalues are null. DataBindItem is also null.

Thank you!
Laura Serban
Top achievements
Rank 1
 answered on 27 Aug 2009
2 answers
134 views
Hi!
   I have a RadGridView for windows on my form which is data bound. Now according to requirements, i have set Autogeneratecolumns to false and programmatic-ally added some GridViewTextBox columns. The user can also add a new Row by clicking Add new Row Button. But before adding a new Row i need to check whether, user has left some of the columns empty or filled them with invalid values. IN that case i need to prompt the user about mistakes and cancel the add new Row. I have tried so much but i could not validate the grid. I desire to set error on each column instead of Rows.I have found some solutions but was unable to use any of them. Any help will be greatly appreciated.

Thanks
Vassil Petev
Telerik team
 answered on 27 Aug 2009
1 answer
111 views
Hi

Reading the post answer in MDI CHild Issue and Window State, indicates that there is an issue that was meant to be fixed with RadForms and the MenuStrip control in the latest Q2 2009 build.

I however have the latest production build (2009.2.9.729), and I am still having a problem with an MDI Child using a MenuStrip, and the behaviour of the child window bar. When maximising the child window, the bar does not disappear as it should, and does not repaint.

The MDI parent window is a RadRibbonForm.

Other MDI child windows that inherit from RadForm work fine (they don't have the MenuStrip on them), maximise correctly without the issue.

Please advise as to how to resolve this problem.

The project targets .NET 2.0 framework, development machine running on XP Pro SP3

Regards

Jayden MacRae

Deyan
Telerik team
 answered on 27 Aug 2009
0 answers
138 views

hai! I have use below code for ascx control page navigation depending upon ascx page name using panel bar...I need breadcrumb for ascx page navigation..can anyone findout some samples...


public
string TrackedUserControl

 

{

 

get { return ViewState["TrackedUserControl"] as string; }

 

 

set { ViewState["TrackedUserControl"] = value; }

 

}

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

if (!IsPostingFromMenu() && IsPostBack)

 

ReloadContent();

}

 

protected void PanelNavigation_PanelNavigationItemClick(object sender, RadPanelBarEventArgs e)

 

{

 

LoadContent(e.Item.Value);

 

}

 

 

private void LoadContent(string menuItemName)

 

{

 

string ucUrl = menuItemName + ".ascx";

 

 

UserControl uc = null;

 

 

try

 

{

uc =

this.LoadControl(ucUrl) as UserControl;

 

 

if (uc != null)

 

{

ContentPlaceholder.Controls.Add(uc);

TrackedUserControl = ucUrl;

}

}

 

catch (Exception ex)

 

{

 

string msg = ex.Message;

 

}

}

 

private void ReloadContent()

 

{

 

UserControl uc = null;

 

 

try

 

{

uc =

this.LoadControl(TrackedUserControl) as UserControl;

 

}

 

catch

 

{

}

 

if (uc != null)

 

ContentPlaceholder.Controls.Add(uc);

}

 

private bool IsPostingFromMenu()

 

{

 

string ctlPostingBack = ScriptManager.GetCurrent(this).AsyncPostBackSourceElementID;

 

 

Control c = this.FindControl(ctlPostingBack);

 

 

if (c == null)

 

 

return false;

 

 

return (c.ID == "PanelNavigation");

 

}


thx

saroja
Top achievements
Rank 1
 asked on 27 Aug 2009
2 answers
260 views
Hi!

I have a main form containing MDI forms.
When I load my MDI form (containing a multi column drop down control), I want the drop down control to have focus so I can start writing in it without first having to selected it.
(Im using a multi drop down control as a search input field)

Can this be done ?

Regards
Per
Per
Top achievements
Rank 1
 answered on 27 Aug 2009
2 answers
158 views
Hello again, I found an error, is as follows, have 2 columns in a DataGrid control multicombobox in the first 2 columns show the control in the datagrid multicombobox and the second control sample 3 columns, the error occurs when entering edit mode, I explain the steps:

multicombobox first entrance, is running normally, in the event CellBeginEdit admission the following code:

CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). DropDownSizingMode = SizingMode.UpDownAndRightBottom  
CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). ValueMember = "Code"  
CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). DisplayMember = "Country"  
CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). Data_bitacora.dataset.Tables DataSource = ( "mars_pais) 
CType (CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). EditorControl, RadGridView). Data_bitacora.dataset.Tables DataSource = ( "mars_pais)  
CType (CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). EditorControl, RadGridView). Columns (0). Width = 100  
CType (CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). EditorControl, RadGridView). Columns (1). Width = 300 

this code is executed to perfection, after having entered the first multicombobox, I will enter the second column which contains the second multicombobox, as I said earlier this control contains 3 columns and have the following code on the previous event:
              
CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). DropDownSizingMode = SizingMode.UpDownAndRightBottom 
CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). ValueMember = "Code" 
CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). DisplayMember = "Department / State
CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). Data_bitacora.dataset.Tables DataSource = ( "mars_departam as d, as mars_pais p")
CType (CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). EditorControl, RadGridView). Data_bitacora.dataset.Tables DataSource = ( "mars_departam as d, as mars_pais p") 
CType (CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). EditorControl, RadGridView). Columns (0). Width = 100 
CType (CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). EditorControl, RadGridView). Columns (1). Width = 100 
CType (CType (RadGVBitacoras.ActiveEditor, RadMultiColumnComboBoxElement). EditorControl, RadGridView). Columns (2). Width = 300 

this code sends me an error in the last line tells me that the control contains 3 columns but not 2, not recognized by the third, although I corrected the table which has 3 columns basa if, in my opinion this is wrong occasions because the control contains 2 columns of another multicombobox in the first column of my datagrid and glass that the error only occurs if the first entry in Edit mode in multicombobox that contains 2 columns, but only if that income contains 3 columns works as if nothing happened, I hope I can help with this error and thank you for all the help I provide.

Edit: Giving hope to understand, I do not speak English well.
Gilberth
Top achievements
Rank 1
 answered on 26 Aug 2009
3 answers
122 views
 1. Alt-Down key does not drop down the Calendar (look-up feature) like .Net's DataTimePicker and ComboBox and even Telerik's own RadComboBox does.

2. Up / Down keys do the same as the Left / Right keys (i.e. previous / next day) on the Calendar vs. "physically" "up" and "down" in the Calendar grid like .Net does.  It's acting as if you're still in Spin mode in the TextBox part of the Control.

3. Page Up / Page Down keys do nothing vs. previous / next month like .Net does.

4. Ctrl-Page Up / Ctrl-Page Down do nothing vs. previous / next year like .Net does.

I could not find any alternate keys that perform the above actions.  Is there a way to override / add to the navigation keys?

Telerik Q1 2009 (v2009.1.9.414), VS 2005 (v8.0.50727.762 SP.050727-7600), XP SP3 on Core2Duo 2.99GHZ with 3GB.
Boyko Markov
Telerik team
 answered on 26 Aug 2009
1 answer
122 views
I'm trying to solve a couple of problems with using a combobox within my RadGridView and not sure if I have taken the most appropriate methods. So in either scenario, the code below might help someone else, but if this is not the way it was intended or of I'm missing something please let me know. I would much prefer to have all the combobox cells show the combobox live instead of when I "hover" or "click" on them.

First Problem is I wanted all of my cells centered, they are dealing with numbers that look much better centered. Even though I set TextAlignment on the columns to MiddleCenter it did not seem to have any effect.

Second Problem is I have a combobox column in the grid that I have successfully databound through some trial and error. The combo box shows text only when looking at it from the grid perspective and that annoys me, I want it to always be in "Edit" mode.Every attempt to turn all of them into edit mode caused the application to crash, so I settled for only showing one at a time by doing it on the mousemove and cellbeginedit methods.

I added events for cellmousemove and cellbeginedit

Code for Cell Mouse move is below (note that since I am changing the Text Alignment I'm being forced to set the color back to solid?)
This activates the "Begin Edit" for the cell it's over if it has one of the values in my combobox.

        private void calendar_grida_CellMouseMove(object sender, MouseEventArgs e) 
        { 
            if (sender is GridDataCellElement) 
            { 
                GridDataCellElement cInfo = (GridDataCellElement)sender; 
                string cellValue = cInfo.Value.ToString().ToLower(); 
                if (cellValue == "n/a" | 
                    cellValue == "open" | 
                    cellValue == "closed"
                { 
                    cInfo.RowInfo.Cells["status_taken"].BeginEdit(); 
                } 
            } 
        } 

The problem now is if I change to another group it crashes the application with object reference not set to an object, to fix that I handle the cellBeginEdit event and cancel the beginedit if the currentcell is not the combobox

        private void calendar_grida_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) 
        { 
            string cellValue = this.calendar_grida.CurrentCell.Value.ToString().ToLower(); 
            if (cellValue == "n/a" | 
                cellValue == "open" | 
                cellValue == "closed"
            { 
                return
            } 
            else 
            { 
                e.Cancel = true
            } 
        } 


Deyan
Telerik team
 answered on 26 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)
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?