Telerik Forums
UI for WinForms Forum
2 answers
119 views
I have created a number of usercontrols that I want to dynamically add to
dockpanels based on user input -

It's all straightforward enough but the users have varying screen sizes
and some of the controls have a fair amount of height.
My problem is I cannot get auto scroll bars when the contents of the docking
panel exceed the boundaries. In your demo apps I see some of the windows
do gain scroll bars when the contents exceed although not all do.

Is there a property / method for the dockpanel that automatically creates scrollbars
based on the contents in the dockpanel ? Or do we have to implement this
ourselves manually ?

Kenneth Jackson
Top achievements
Rank 1
 answered on 11 Feb 2009
9 answers
282 views
I'm trying to figure out a way to have a ContentPanel size itself automatically based on the amount of text in a Label control.  I've tried various ways of automatically sizing the Label in hopes that the ContentPanel would enlarge to accommodate the content, and when that failed I tried programmatically changing the size of the GroupElement to match the size of the label.  None of my attempts has been successful.

Can anyone give me some tips on whether this is possible and if so how to accomplish it?

Thanks,
Josh
Justin
Top achievements
Rank 1
 answered on 11 Feb 2009
11 answers
170 views
Hi is there a way to stop the beeps when tabbing around a gridview?
Nick
Telerik team
 answered on 11 Feb 2009
1 answer
173 views
Hi,
I am using check box column to select row.
In fact when the check box is selected, I am storing the DataBondItem of checked row in an Arraylist.

The constraint here is, at a time only one check box has to be checked.
When the next row is checked. The privious check box should be unchecked.

The above is the total functionality.

I am using, BeginEdit and ActiveEditorValuechanged event to perform the above functionality.

The problem here is I am getting 'Object Reference Error' once in a while.

Can anybody suggest better way to obtain the above functionality ?

Current Code for reference :

 void radGrid_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
            currentRowIndex = e.RowIndex;
            CurrentRowDataItem = this.radGrid.Rows[e.RowIndex].DataBoundItem;

            try
            {
                CurrentRowDataItem = this.radGrid.Rows[e.RowIndex].DataBoundItem;
                if (radGrid.Columns[e.ColumnIndex] is GridViewCheckBoxColumn)
                {
                    //When the editor is clicked properly
                    if (radGrid.ActiveEditor != null && radGrid.ActiveEditor.Value != null)
                    {
                        //create handler for active Editor
                        radGrid.ActiveEditor.ValueChanged += new EventHandler(ActiveEditor_ValueChanged);
                    }
                }
            }
            catch { }
        }

        void ActiveEditor_ValueChanged(object sender, EventArgs e)
        {
            //Only when the value is not null
            if (radGrid.ActiveEditor != null && radGrid.ActiveEditor.Value != null)
            {
                //remove the handler, because next time when the editor is clicked new handler wil be created
                radGrid.ActiveEditor.ValueChanged -= new EventHandler(ActiveEditor_ValueChanged);
                try
                {
                    //Here check the any row's check box selected in the Grid or not.
                    if (this.selectedRows != null && radGrid.ActiveEditor != null)
                    {
                        //current data item
                        object item = radGrid.CurrentRow.DataBoundItem;

                        if (radGrid.ActiveEditor.Value.ToString().ToLower() == "true")
                        {
                            this.selectedRows.Clear();
                            this.selectedRows.Add(item);

                            if (PreviousRowDataItem == null || previousCheck == -1)
                            {
                                //previousCheck = currentRowIndex;
                                PreviousRowDataItem = this.radGrid.CurrentRow.DataBoundItem;
                            }
                            
                            //set current index of previously selected row. It has to be checked and set because while sorting index may change
                            previousCheck = GetActualCheck(PreviousRowDataItem);

                            //Uncheck the previously selected
                            if (previousCheck != -1)
                            {
                                //set false if its true
                                if (radGrid.Rows[previousCheck].Cells[0].Value.ToString().ToLower() == "true")
                                {
                                    radGrid.Rows[previousCheck].Cells[0].Value = Boolean.FalseString;
                                }
                            }
                            //change the previous rowdata to current dataitem
                            if (currentRowIndex != -1)
                            {
                                PreviousRowDataItem = this.radGrid.CurrentRow.DataBoundItem;
                            }

                            if (OnSelectionChange != null)
                            {
                                OnSelectionChange();
                            }
                        }
                        //if uncheck clear the selected rows
                        else
                        {
                            this.selectedRows.Clear();
                        }

                        //if the Edit is finished, have to call this Default function otherwise the edit should not be commited
                        bool b = radGrid.EndEdit();
                    }
                }
                catch (Exception ex)
                {
                    Nexus.UI.BaseMdiParent.RaiseException(this, ex);
                }
            }
        }
Nick
Telerik team
 answered on 11 Feb 2009
1 answer
105 views
I am using checkbox column in my grid.
At a time only one checkbox can be in selected state.
how can i do that?
Nick
Telerik team
 answered on 11 Feb 2009
1 answer
87 views
I need to have a windows program display a crawl across the bottom of the window. Would RadRotator do this? I need to have the crawl just run without any human intervention.

TIA - Jeff.
Nick
Telerik team
 answered on 11 Feb 2009
1 answer
88 views
I have a reasonably complex request for the GridView control, is it possible to group some rows but not others? and also to have it ordered so i have some of my ungrouped rows above and some below the grouped items?

i have a fixed number of rows... it'll look something like this .. (each row has 3 sets of checkboxes after the below text).

- create (ungrouped)
- Review (Group Header)
        - Send for Review
        - Fail Review
        - Pass Review
        - Cancel Review
- Approval (Group Header)
        - Send for Approval
        - Fail Approval
        - Pass Approval
        - Cancel Approval
        - Bypass Approval
- Delete (ungrouped)
- Withdrawn (ungrouped)
- Review (ungrouped)

Hope that is clear to you.

Cheers :)
Victor
Telerik team
 answered on 11 Feb 2009
1 answer
105 views
Hi dear
i have one treeview with somw static nodes . for examples : node1 , node2 , node3
now i want to map some records from database in node2`s childs .
i want to do it with using dataset .  and binding . but binding 1 node's child
in basic we can read database records by records and add one records to treevies in one step manually . but it works very slow !
with mapping records to treeview via dataset i think speed is so better .
can u help me ?


Victor
Telerik team
 answered on 11 Feb 2009
1 answer
113 views

Hi,

I am using Rad Grid View of telerik version  8.2.0.0.
Sometimes I get an exception if I call 'best fit' on last column via context menu. It is not reproducible every time and here is complete log

 

System.NullReferenceException:
Telerik.WinControls.UI.GridHeaderCellElement.menuItemBestFit_Click(Object sender, EventArgs e) bei Telerik.WinControls.RadItem.OnClick(EventArgs e) bei Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e) bei Telerik.WinControls.UI.RadMenuItemBase.OnClick(EventArgs e) bei Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e) bei Telerik.WinControls.RadItem.DoClick(EventArgs e) bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) bei Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args) bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) bei Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args) bei Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e) bei Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e) bei Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e) bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.ScrollableControl.WndProc(Message& m) bei Telerik.WinControls.RadControl.WndProc(Message& m) bei Telerik.WinControls.UI.RadPopupControl.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) # ShowThreadExceptionDialog ---> [L-0] >>> Void HandleThreadException(System.Object, System.Threading.ThreadExceptionEventArgs) >>> Void OnThreadException(System.Exception) >>> Void WndProcException(System.Exception) >>> Void OnThreadException(System.Exception) >>> IntPtr Callback(IntPtr, Int32, IntPtr, IntPtr) >>> IntPtr DispatchMessageW(MSG ByRef) >>> Boolean System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32) >>> Void RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) >>> Void RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) >>> Void Run(System.Windows.Forms.Form)


Can I handle this issue at my end? Please let me know.

Regards,
Renu

Jack
Telerik team
 answered on 11 Feb 2009
1 answer
98 views
This issue, as far as I can see, is totally GUI based. I don't think you need any code to re-create it.

When there is a column (or two) in the "group by" panel, and you hold and slightly move one of the columns, but not enough to actually change the grouping, one of the group header's text will be cleared. In my case I have used the AutoGenerateColumns feature along with SaveLayout and LoadLayout. I am on Windows Vista. Even in this example application (for a different thing), the issue is still shown.
Jack
Telerik team
 answered on 11 Feb 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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?