Telerik Forums
UI for WinForms Forum
1 answer
108 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
169 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
142 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
162 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
314 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
208 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
183 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
148 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
1 answer
191 views
Hello,

I'm using CellBeginEdit event on RadGridView to optionally cancel the edit depending on the contents on the cell. Some example code is below.

But what if the cell is edited is not in the top level hierarchy? I'm using a hierarchy gridview with relations. RowIndex cannot tell me this. How can I know this? I just want to access the DataBoundItem on the current editing cells row.

public static void CellBeginEdit_ReadonlyRows(object sender, Telerik.WinControls.UI.GridViewCellCancelEventArgs e) 
    if (e.RowIndex == -1) 
         return; 
 
    RadGridView gridView = sender as RadGridView; 
 
    if (gridView == null) 
         return; 
 
    MyEditableEntry groupItem = gridView.Rows[e.RowIndex].DataBoundItem as MyEditableEntry; 
 
    if (groupItem == null || !groupItem.IsEditable) 
         e.Cancel = true
    else 
         e.Cancel = false
 


Robert
Top achievements
Rank 1
 answered on 25 Aug 2009
1 answer
335 views
The example posted here

http://www.telerik.com/community/forums/winforms/ui-controls/drop-and-drag-between-two-listbox.aspx

only allows single listboxitem moves. If I set the mousedown event to be

 Private Sub lstMembers_MouseDown(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgs) Handles lstMembers.MouseDown 
      Dim lstBox As RadListBox = sender 
      lstBox.DoDragDrop(lstBox.SelectedItems, DragDropEffects.Move) 
   End Sub 




The listbox does not select the proper values.

Is there a way you can drag multiple values?

Thanks

-Matt
Robert
Top achievements
Rank 1
 answered on 25 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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?