Does RadRadioButton support text wrapping?
See this picture : if I set or no TextWrap property - text is always in one line.
By the way, if I set proprety AutoSize to True, then False again - text is wrapped, but in designer, not during execution. And after closing/starting Visual Stiudio - text is again in one line.
PS: Same question about RadCheckBox control.
| LogDocument documentLog = new LogDocument(); |
| documentLog.Text = documentTitle; |
| documentLog.CurrentFileId = selectedIndex; |
| documentLog.Load(); // Loads data into grid |
| AirFile.AddNewMostRecentFile(documentTitle, selectedIndex); |
| this.radDock.AddDocument(documentLog); |
| class LogDocument : DocumentWindow |
| { |
| public LogDocument() |
| { |
| AddGridToForm(); |
| } |
| public void Load() |
| { |
| LoadGridWithData(); |
| } |
| private void AddGridToForm() |
| { |
| RadTabStrip radTabStrip = new Telerik.WinControls.UI.RadTabStrip(); |
| TabItem tabGridItem = new Telerik.WinControls.UI.TabItem(); |
| TabItem tabDetailItem = new Telerik.WinControls.UI.TabItem(); |
| // |
| // radTabStrip1 |
| // |
| radTabStrip.AutoScrollMargin = new System.Drawing.Size(0, 0); |
| radTabStrip.AutoScrollMinSize = new System.Drawing.Size(0, 0); |
| radTabStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254))))); |
| radTabStrip.Dock = DockStyle.Fill; |
| radTabStrip.Location = new System.Drawing.Point(0, 0); |
| radTabStrip.Name = "radTabStrip"; |
| radTabStrip.ScrollOffsetStep = 5; |
| radTabStrip.TabScrollButtonsPosition = Telerik.WinControls.UI.TabScrollButtonsPosition.RightBottom; |
| radTabStrip.Text = "radTabStrip"; |
| // |
| // tabGridItem |
| // |
| tabGridItem.Alignment = System.Drawing.ContentAlignment.BottomLeft; |
| // |
| // tabItem1.ContentPanel |
| // |
| tabGridItem.ContentPanel.BackColor = System.Drawing.Color.Transparent; |
| tabGridItem.ContentPanel.CausesValidation = true; |
| tabGridItem.IsSelected = true; |
| tabGridItem.Margin = new System.Windows.Forms.Padding(4, 0, 0, 0); |
| tabGridItem.Name = "tabGridItem"; |
| tabGridItem.StretchHorizontally = false; |
| tabGridItem.Text = "Grid"; |
| // |
| // tabItem2 |
| // |
| tabDetailItem.Alignment = System.Drawing.ContentAlignment.BottomLeft; |
| // |
| // tabItem2.ContentPanel |
| // |
| tabDetailItem.ContentPanel.BackColor = System.Drawing.Color.Transparent; |
| tabDetailItem.ContentPanel.CausesValidation = true; |
| tabDetailItem.Margin = new System.Windows.Forms.Padding(4, 0, 0, 0); |
| tabDetailItem.Name = "tabDetailItem"; |
| tabDetailItem.StretchHorizontally = false; |
| tabDetailItem.Text = "Item Detail"; |
| // TODO |
| // Add controls to show current row details in a form |
| grid.Dock = DockStyle.Fill; |
| grid.RowsChanged += new Telerik.WinControls.UI.GridViewCollectionChangedEventHandler(GridRowsChanged); |
| grid.DoubleClick += new System.EventHandler(GridDoubleClick); |
| // |
| // Add TabItems to TabStrip |
| // |
| radTabStrip.Items.AddRange(new Telerik.WinControls.RadItem[] { tabGridItem, tabDetailItem }); |
| // |
| // Add grid to tab 1 |
| // |
| tabGridItem.ContentPanel.Controls.Add(grid); |
| // |
| // Add tab strip to form |
| // |
| Controls.Add(radTabStrip); |
| } |
| /// <summary> |
| /// Persist changes to current row to database. |
| /// </summary> |
| /// <param name="sender"></param> |
| /// <param name="e"></param> |
| private void GridRowsChanged(object sender, GridViewCollectionChangedEventArgs e) |
| { |
| Save(); |
| } |
| public void DeleteRow() |
| { |
| // Delete code here |
| // then save changes to db |
| Save(); |
| } |
Object reference not set to an instance of an object.
at Telerik.WinControls.UI.RadGridView.ValidateColumnChange(GridViewColumn column)
at Telerik.WinControls.UI.GridViewTemplate.SetCurrentColumn(GridViewColumn column, Boolean update, Boolean shift, Boolean control)
at Telerik.WinControls.UI.BaseGridBehavior.SetCurrentPosition(GridRowElement row, GridCellElement cell)
at Telerik.WinControls.UI.BaseGridBehavior.OnMouseDownRight(MouseEventArgs e)
at Telerik.WinControls.UI.BaseGridBehavior.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
| Public Shared Sub AddScreenTip(ByVal button As RadButton, ByVal headerText As String, ByVal bodyText As String) |
| If Not button.ButtonElement.ScreenTip Is Nothing Then |
| button.ButtonElement.ScreenTip.Items.Clear() |
| End If |
| Dim Tip As New RadOffice2007ScreenTipElement() |
| Tip.CaptionLabel.Text = headerText |
| Tip.MainTextLabel.Text = bodyText |
| button.ButtonElement.ScreenTip = Tip |
| End Sub |
private void StateRadGridView1_CellValidating(object sender, CellValidatingEventArgs e)
{
GridViewDataColumn column = e.Column as GridViewDataColumn;
if (e.Row is GridViewDataRowInfo && column != null && column.FieldName == "MntStaName")
{
if (string.IsNullOrEmpty((string)e.Value))
{
MessageBox.Show("Description cannot be blank.", "JMS Error Message", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}