Telerik Forums
UI for WinForms Forum
4 answers
198 views
Hello,


When using hierarchical gridview, and acceding to the child gridview with the IDE, I noticed that at first I had only one child gridview, but after clicking on OK button, I got 2, then 4 identical gridviews. And they are displaying caption tabs saying "Table".

I tried to remove them, to keep only one, but then no child gridview was kept by the designer (gridviewTemplate was lost) , and compiling became impossible.

Is this a known bug ? Is there a way to safely remove the duplicated child gridviews and keep only one ?

Thank you for any help.
Stefan
Telerik team
 answered on 15 Mar 2011
12 answers
316 views
I have a grid with 5 columns, the first 2 columns, ID and ParentID, are for self-reference setup and are hidden. The rest are a checkbox and 2 text columns. I set its datasource to a BindingList that has a single row and 250 "child" rows. The parent row expands fine when there is no sorting. However, as soon as I click on any of the column headers to sort, it takes more than 10 seconds to expand, and scrolling also becomes very sluggish.
I'm using the latest release, RadControls_WinForms_2010_3_10_1215_dev. Is there a trick to speed it up? Below are the code snippet and attached is a scree

Thanks,
Andy
    private void Form1_Load(object sender, EventArgs e)
    {
        PopulateGrid();
        radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "ID", "ParentID");
    }
 
    private void PopulateGrid()
    {
        BindingList<RowBindingInfo> rowList = new BindingList<RowBindingInfo>();
        int rowID = -1;
 
        for (int i = 0; i < 1; i++)
        {
            RowBindingInfo rowInfo = new RowBindingInfo(++rowID, -1, false, "Room " + i.ToString(), "Desc " + i.ToString());
            rowList.Add(rowInfo);
 
            int pid = rowID;
            for (int j = 0; j < 250; j++)
            {
                RowBindingInfo childRow = new RowBindingInfo(++rowID, pid, false, string.Empty, "Desk " + j.ToString());
                rowList.Add(childRow);
            }
        }
 
        radGridView1.DataSource = rowList;
    }
}
 
public class RowBindingInfo
{
    public RowBindingInfo(int rid, int prid, bool incl, string r, string d)
    {
        ID = rid;
        ParentID = prid;
        Included = incl;
        Room = r;
        Desc = d;
    }
 
    public int ID { get; set; }
    public int ParentID { get; set; }
    public bool Included { get; set; }
    public string Room { get; set; }
    public string Desc { get; set; }
}


Thanks,
Andy
Alexander
Telerik team
 answered on 15 Mar 2011
11 answers
489 views

Need some help here...

I'm exporting a RadDataGrid to CSV but get the 'object reference to instance of an object' error. Every time i have a empty *.csv doc and the csvExporter.RunExport crashes...

Changing it to an Excel exporter makes it work fine.

code:

Dim exportGridView As New Telerik.WinControls.UI.RadGridView
 exportGridView.DataSource = rep.GetObjectCorrespondentieGegevens(projectId)
Public Function GetObjectCorrespondentieGegevens(ByVal id As Integer) As Object Implements     ICorrespondentieRepository.GetObjectCorrespondentieGegevens
           Dim model = From p In _db.tblAannemers.AsEnumerable() _
                       Select p.fldAannemerNaam
           Return model
       End Function
Private Shared Sub RunExportToCSV(ByVal fileName As String, ByRef gridView As RadGridView)
           Dim csvExporter As ExportToCSV = New ExportToCSV(gridView)
           'csvExporter.FileExtension = "txt"
           'csvExporter.SummariesExportOption = SummariesOption.ExportAll
           Try
               'csvExporter.
               csvExporter.SummariesExportOption = SummariesOption.DoNotExport
               csvExporter.RunExport(fileName) ' this is where the exception happens :-(
           Catch ex As Exception
           End Try
       End Sub
Martin Vasilev
Telerik team
 answered on 15 Mar 2011
1 answer
171 views
Hi,
I'm probably doing something wrong. But I have not find any help in documentation and in the demos.
When I prepare commandbar visually in designer, I'm able to move strips to correct order.
But how to do this in code?
I merge two commandbars together, so I add the strip to the commandCarRow, but in soe cases this second strip is displayed before the original first. And I have no clue why?
commandBarChild.Rows[0].Strips.Add(strip);
Thanks for any idea, as I said I didn't find any help in documentation or demos for that. If there is something about it, jsut point me there, please.
Ivan Todorov
Telerik team
 answered on 15 Mar 2011
3 answers
191 views
Hello

    How can I change the properties from a RadButtonElement from another thread ?

        Hervé

Ivan Petrov
Telerik team
 answered on 15 Mar 2011
3 answers
325 views
I am needing to display some text on my form which has some older HTML tags, e.g. FONT, and other HTML tags.  

The radlabel does not display the HTML properly even when wrapped in "<HTML>".  However, if I set the value of the radmarkupeditor to the HTML, it is displayed properly.  In fact, when I hit APPLY, it actually converts the older tags to more compliant versions, ala SPAN tags with STYLE attributes.

How can I get the label to display the HTML properly?  Or which control does the radmarkupeditor take advantage of?  Or can I call the internal "convert" method somehow?

Please advise!
Peter
Telerik team
 answered on 15 Mar 2011
3 answers
186 views
Hello Everybody,

How to restrict users to leave from one radForm to other before completing a certain process in radDock. I tried to apply some logic on radDock_ActiveWindowChanged event but its not restraining it to change. Following code I wrote in radDock changed event.

((HostWindow)(this.radDock1.DockWindows(radDock1.ActiveWindow.Name + "1"))).Select();    
((DocumentWindow)(this.RadDock1.DockWindows(windowName))).Select();

Thanks,
Saad

Richard Slade
Top achievements
Rank 2
 answered on 15 Mar 2011
1 answer
258 views
If you don't like the way the RadGridView adds the Filter text (e.g. Contains, Equals, etc) in the Filter row, you can use this code that I wrote.  The text is unreadable in skinnier columns.  Plus, it confused my users since clicking on the word "Contains" did not automatically allow them to start typing; they had to click next to the word.

Anyways, this code simply collapses the text element and adds a tooltip to the filter row's cell and button.
Private Sub RadGridView1_ToolTipTextNeeded(ByVal sender As Object, ByVal e As Telerik.WinControls.ToolTipTextNeededEventArgs) Handles RadGridView1.ToolTipTextNeeded
    If TryCast(sender, GridFilterCellElement) IsNot Nothing Then
        e.ToolTipText = CType(sender, GridCellElement).ToolTipText
    End If
End Sub
 
Private Sub RadGridView1_ViewCellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles RadGridView1.ViewCellFormatting
    HideFilterText(e.CellElement)
End Sub
 
 
Friend Sub HideFilterText(ByVal CellElement As GridCellElement)
    Dim oFilterCellElement As GridFilterCellElement
    Try
        If TryCast(CellElement, GridFilterCellElement) IsNot Nothing Then
            oFilterCellElement = CType(CellElement, GridFilterCellElement)
            oFilterCellElement.ToolTipText = oFilterCellElement.FilterOperatorText.Text.Replace(":", "")
            oFilterCellElement.FilterButton.ToolTipText = oFilterCellElement.FilterOperatorText.Text.Replace(":", "")
            oFilterCellElement.FilterOperatorText.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        End If
    Catch ex As Exception
        ' Do nothing
    End Try
 
End Sub


I now use this on all my grids within my current project.  It would be nice if something similar was built in.  If it is already, then I've missed it in the documentation.

Feel free to offer code improvements or another way.
Emanuel Varga
Top achievements
Rank 1
 answered on 15 Mar 2011
1 answer
175 views
Hi, I'm having an issue refreshing the data in my treeview.  Here is the treeview.

'Build Tree View
Private Sub BuildtvOrgan()
    tvOrgan.RelationBindings.Add(New RelationBinding("CompanyDepts", Me.DepartmentBindingSource))
    tvOrgan.RelationBindings.Add(New RelationBinding("Department_Employee", Me.EmployeeBindingSource))
    tvOrgan.RelationBindings.Item(0).DisplayMember = "DeptName"
    tvOrgan.RelationBindings.Item(0).ValueMember = "id"
    tvOrgan.RelationBindings.Item(0).DataSource = DepartmentBindingSource
    tvOrgan.RelationBindings.Item(1).DisplayMember = "FName"
    tvOrgan.RelationBindings.Item(1).ValueMember = "id"
    tvOrgan.RelationBindings.Item(1).DataSource = EmployeeBindingSource
    tvOrgan.DataSource = CompanyBindingSource
    tvOrgan.ValueMember = "id"
    SetImages(tvOrgan.Nodes)
    tvOrgan.ExpandAll()
End Sub

Now, when I modify the underlying data the treeview doesn't change.  It does change if I add data to the underlying tables.  If I add a new Company.Department.Employee to the datatables the treeview updates, with an expandall().  However if I change department A to now be in department C instead of B it doesn't move until I reload the app.  Any idea's anyone?  How can I get the treeview to show changes made to the datasource.

Thanks
Nick Jones
Top achievements
Rank 1
 answered on 15 Mar 2011
2 answers
173 views
Is it possible to replace the appointment window with a custom window where you will have full control?

Best R, Thomas
Richard Slade
Top achievements
Rank 2
 answered on 15 Mar 2011
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?