Telerik Forums
UI for WinForms Forum
3 answers
153 views

Hi,

I have a HtmlViewDefinition that is added to a grid so as to provide detail information for a row, similar to your example in http://www.telerik.com/help/winforms/gridview-overview.html except I only have a single row defined in the HtmlViewDefinition

This works OK, but I need to enable column headers which I do by setting 

template.ShowColumnHeaders = True

and then for each column setting

template.Columns(column.FieldName).HeaderText

This seems to enable the headers OK and they are displayed but I have a problem with the header row height. It appears to consume the entire row height for the HtmlViewDefinition.RowTemplate.Row I have added and I can't find a way to modify it.

Is there a way to change the header row height?

Thanks,

Mark.

 

 

Hristo
Telerik team
 answered on 22 Feb 2016
0 answers
256 views

I'm posting this for anyone who comes across this same issue.

As of Q1 2015 SP1, the CommandBarToggleButton has been changed with respect to how it behaves when disabled. If you want toggle buttons to look the same as regular buttons when disabled, you need to set the UseDefaultDisabledPaint property to true and also handle the EnabledChanged event to turn off or on the DrawBorder and DrawFill properties.

        private void toggleSelectMode_EnabledChanged(object sender, EventArgs e)
        {
            ((Telerik.WinControls.UI.CommandBarToggleButton)sender).DrawBorder = ((Telerik.WinControls.UI.CommandBarToggleButton)sender).Enabled;
            ((Telerik.WinControls.UI.CommandBarToggleButton)sender).DrawFill = ((Telerik.WinControls.UI.CommandBarToggleButton)sender).Enabled;
        }

Without these steps, when you disable a toggle button you'll see one or all of the following

  • the buttons stay in color (not grayed out) 
  • the border of the button visible
  • the background of the button go gray instead of just the icon

In the attached image, all of the command bar buttons have Enabled set to false. The controls look as expected except for the toggle buttons. If you follow the steps given in this post, they'll look as expected too.

Good luck all!

Chris

 

 

Chris Vaughn
Top achievements
Rank 1
 asked on 19 Feb 2016
2 answers
324 views

Hi everyone. We have a child grid that is bound to data as requested. We have added a GridViewCheckBoxColumn to the row, but we can't seem to edit it?

Here we set the child element:

grdCustomers.DataSource = contact.GetList(true, 0);
grdCustomers.Templates.Add(CreateChildTemplate());
The CreateChildTemplate method looks like this:

private GridViewTemplate CreateChildTemplate()
{
    var template = new GridViewTemplate();
    template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    template.AllowEditRow = true;
    template.ReadOnly = false;           
 
    var select = new GridViewCheckBoxColumn("CheckBox");
    var field1 = new GridViewTextBoxColumn("Field1");
    var field2 = new GridViewTextBoxColumn("Field1");
    
    select.ReadOnly = false;
    select.DataType = typeof(bool);
    select.EditMode = EditMode.OnValueChange;           
     
    template.Columns.AddRange(select, field1, field2);
 
    return template;
}

Then we bind the data to the child grid

var row = e.Template.Rows.NewRow();
 
row.Cells["Field1"].Value = dataRow.Field1;
row.Cells["Field2"].Value = dataRow.Field2;
row.Cells["Select"].Value = dataRow.Select;
row.Cells["Select"].ReadOnly = false;
 
e.SourceCollection.Add(row);

No watter what we have tried, we can't get the checkbox to be editable?

Please advise.

Thank you.

 

 

 

Hristo
Telerik team
 answered on 19 Feb 2016
1 answer
395 views

Hello,

I have been trying to bind two properties to datetimepicker, the date itself and a boolean that i have bound to the RadCheckBoxElement.

Binding the date property results in no problems what so ever, as for the boolean unfortunately i cannot say the same thing.

For the sake of trial and error, i have tried binding this property to CheckState, IsChecked and ToogleState with no results.

Thanks in advance for any help provided.

Best regards,

João Carvalho

Hristo
Telerik team
 answered on 19 Feb 2016
3 answers
247 views

Hi All

Me again ;)

I have tried to search, but cannot find the answer.

 

I have a DataSet I use for the gantview. All the properties is correct, but on the first time a user uses it, there is still no data, so it is an empty Dataset.

On this empty Gantview though, there is no Context Menu, so here is my question: How do a User add the First Task to an Empty Ganttview ?

 

Regards

 

Marius

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Feb 2016
1 answer
151 views

I want to print my GridView,when i set gv.PrintStyle.FitWidthMode = PrintFitWidthMode.FitPageWidth, the header text can not wrap automatically. The row text can wrap automatically, but its height can not grow automatically, how to do, thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Feb 2016
1 answer
115 views
Hello everybody , my question is very simple, how to add a checkbox control to my ListControl ? , some property must be enabled or should I create through code? 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Feb 2016
1 answer
124 views

Hi,

 I have a form with a radGridView (with 4 columns), the radGridView datasource is a datatable which i update every one second.

When i try to resize any column the width is being reset instead of stretching according to the mouse position.

 

Here is the test application code :

 

Random rndRandom = new Random();

private void RadForm1_Load(object sender, EventArgs e)
{
    radGridView1.AutoGenerateColumns = false;

    timer1.Start();
}



private void timer1_Tick(object sender, EventArgs e)
{
    DataTable dt = new DataTable();
    dt.Columns.Add("AAA1", typeof(int));
    dt.Columns.Add("AAA2", typeof(int));
    dt.Columns.Add("AAA3", typeof(int));
    dt.Columns.Add("AAA4", typeof(int));

    for (int i = 0; i < 20; i++)
    {
        DataRow dr = dt.NewRow();

        dr["AAA1"] = rndRandom.Next();
        dr["AAA2"] = rndRandom.Next();
        dr["AAA3"] = rndRandom.Next();
        dr["AAA4"] = rndRandom.Next();

        dt.Rows.Add(dr);
    }

    radGridView1.DataSource = dt;
}

 

Is there anyway to sort this issue?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Feb 2016
7 answers
235 views

Hi!

 

How can I delete string ("Any") in Scheduler Resources?

This this how I add my own strings

                            for (int i = 0; i < temp.Length; i++)
                            {
                                radDropDownList5.Items.Add(temp[i].ItemArray[3].ToString());
                                Resource resource = new Resource();
                                resource.Id = new EventId(i);
                                resource.Name = temp[i].ItemArray[3].ToString();
                                //resource.Color = colors[i];
                                //resource.Image = this.imageList1.Images[i];
                                MessageBox.Show(temp[i].ItemArray[3].ToString());
                                this.radScheduler1.Resources.Add(resource);
                            }

But I results I see this (attach screenshot)

 

Best regards, Me!

yurinkomarov
Top achievements
Rank 1
 answered on 18 Feb 2016
5 answers
159 views

I am implementing a detail child row in a grid as per the example at in ..\QuickStart\GridView\Hierarchy\TabbedChildViews

I have a simplified view with a single row and two columns, row height 100 and column 1 width 350, column 2 width 600 (excluding the image)

I am looking for some pointers on how to get the height of the row/cell to scroll when the height of the contained content exceeds the row height. Also how to get the cell to correctly wrap the text?

Currently I am getting the row rendered as in the image, which is incorrect. It is not wrapping the text correctly as the characters are vanishing off the right edge of the first cell. Also, the content loaded into the cell is a lot higher than the cell/row height ( in the provided image the cell field has 15+ lines of text) , but the scroll bar does not allow scrolling for the entire content. How could this be achieved?

 The Cells are added to the view as :

viewDef.RowTemplate.Rows(0).Cells.Add(New CellDefinition(column.FieldName, 0, 1, 1))

And the CellFormatting code for the cell is :

e.CellElement.Text = ("<html>" + e.CellElement.RowInfo.Cells(columnSpec.FieldName).Value.ToString().Replace(" ", "&nbsp;") + "</html>")
e.CellElement.TextAlignment = ContentAlignment.TopLeft
e.CellElement.Padding = New Padding(3)
e.CellElement.TextWrap = True
e.CellElement.AutoSizeMode = RadAutoSizeMode.Auto
e.CellElement.AutoSize = True

 

The e.CellElement directives have been added via trial and error.

Thanks,

 Mark

 

Hristo
Telerik team
 answered on 17 Feb 2016
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?