Telerik Forums
UI for WinForms Forum
1 answer
114 views
Hello,

Assuming I have a two levels hierarchical grid that is build dinamically where I don't know the number of the child grids and where the master template is different respect to the child template.

In order to export to pdf a gridview that contains child gridviews (hierarchical grid) I create an ExportToPDF object:

ExportToPDF exporter = new ExportToPDF(radGridView1);
exporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
exporter.SummariesExportOption = SummariesOption.ExportAll;
exporter.FitToPageWidth = false;
exporter.Scale = 1;
exporter.FileExtension = "pdf";
exporter.TableBorderThickness = 1;
exporter.PdfExportSettings.EnableCopy = true;
exporter.HTMLCellFormatting += new Telerik.WinControls.UI.Export.HTML.HTMLCellFormattingEventHandler(exporter_HTMLCellFormatting);
exporter.ExportVisualSettings = true;
exporter.ExportHierarchy = true;
exporter.PdfExportSettings.FontType = Telerik.Apoc.Render.Pdf.FontType.Embed;

I need to format the cell value in the case it is type Decimal so I have added a new handle for the HTMLCellFormatting event:

void exporter_HTMLCellFormatting(object sender, Telerik.WinControls.UI.Export.HTML.HTMLCellFormattingEventArgs e)
{
    if (radGridView1.Columns[e.GridColumnIndex].DataType == Type.GetType("System.Decimal"))
    {
     // Some code to manage the format
       //e.HTMLCellElement.Value = string.Format(ecc ecc)
    }
}

In this event handler I need to retrieve the DataType of the current column and this code works perfectly if the current cell e.HTMLCellElement belongs to the master template in the hierarchical order. But when the current cell belongs to a child template it seems there is no way to retrieve the cell's column datatype because there is no way to retrieve what child gridview the cell belongs just starting from the "e" object.

So my question is: is there a way to understand if the indexe.GridColumnIndex refers to the MasterTemplate or if it refers to the Child Template inside the exporter_HTMLCellFormatting ?

Thanks for any aid,
Alcide




Martin Vasilev
Telerik team
 answered on 25 May 2011
2 answers
253 views
How can I get node bounding rectangle? There is no BoundingRectangle or Bounds or smth like this in RadTreeViewNode class.
Jack
Telerik team
 answered on 25 May 2011
1 answer
167 views
Did something change in the Q1 2011 release for datagrid that causes breaking changes?
I just upgraded today, fired up a project that has been compiling and working flawlessly and I'm getting a huge amount of compilation errors around the Grid control.

The main one that is significant is the following snippet:
GridViewDataColumn oColorName = new GridViewDataColumn();
oColorName.UniqueName = "ColorName";
oColorName.HeaderText = "Color Name";
radGridReport.Columns.Insert(6, oColorName);

I'm getting a red squiggly under the 'new GridViewDataColumn()' with the following error:
"Cannot create an instance of the abstract class or interface 'Telerik.WinControls.UI.GridViewDataColumn'"
rjmorton
Top achievements
Rank 1
 answered on 24 May 2011
11 answers
1.7K+ views
RadGrid.Rows.Clear() doesn't work!? is there a bug?

thanks, andreas
Abdulrahman Khalil
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
333 views
Is there any way to make the editorbox Multiline.

The problem is some of my items (in the collection) are over two lines.  When the two line item is selected the item appears in the editorbox - but only the first line appears.  Is there any way to get the editorbox to show two or more lines.

Furthermore, is it possible to show the editorbox with the picture associated with the item?


Many thanks.
Peter
Telerik team
 answered on 23 May 2011
2 answers
142 views
Hello!

I hope the Telerik team has learned their lesson with the disastrous releases of Q3 2010 and Q1 2011.
While I really would like to get the bugfixes, especially for the grid control,
I have not been able to integrate anything into production code since 2010Q2 due to showstoppers and missing functionality.

Please let the Q2 release be centered around bug fixing and not forcing half-baked new features or dubious refactorings on us.

Also I strongly urge you, not to remove bread-and-butter controls like treeview and replace them with obviously unfinished/untested refactorings. If you must refactor - and especially if the new control lacks functionality of the old one - please give us a chance to migrate our code over several telerik releases. You did that with the docking framework, why not with the very central treeview control?

Regards
Erwin
Jack
Telerik team
 answered on 23 May 2011
3 answers
133 views
Hi,

in my app, I sometimes have to reload an unbound treeview because the underlying data changes. Now it would be nice to keep the state of the tree view (selected nodes, expanded state etc.) What's a good strategy to implement this?
I do have object identity information in an object in the Tag attribute, so I can find the logically identical nodes after a reload.
Thinking of maintaining maps of selected and expanded nodes so I can re-apply those attributes after reload. Is that a good idea?

I'm using demand loading for non-root nodes. Also I have to take into account, that there might be some nodes missing or additional nodes appearing at reload.
Has anybody implemented something similar?

Regards
Erwin
Julian Benkov
Telerik team
 answered on 23 May 2011
1 answer
160 views
Hi, 
I have a problem with the size of the radform.
I project the radforms with fixed size, but the dimension changes using different pc,
so sometime I can view all the objects in the radform, sometime in the bottom part,
some objects are visible only in part.
This is the layout parameters I use:

// Layout & appearance.
            MaximizeBox = false;
            MinimizeBox = false;            
            FormBorderStyle = FormBorderStyle.FixedDialog;
            Size = new Size(589, 630);
            ShowIcon = false;
            ShowInTaskbar = false;
            Text = " " + Application.ProductName;
            ThemeName = "Dialog";
            AutoScaleMode = AutoScaleMode.None; 
            BackgroundImage = resources.Icons.About;
            BackgroundImageLayout = ImageLayout.Center;

I don't understand why the view has to change on different pc with the same video configuration.

thank you
Martin Vasilev
Telerik team
 answered on 23 May 2011
1 answer
95 views
I am using the Tag property to store a DataRow for each node.  It seems to work fine except for when I try to retrieve it in the NodeCheckChanged event where it is returned as nothing/null.  If I iterate through the nodes and inspect the tag property, it is set properly. Has this been reported by anyone?  I have a work around to just create a mirrored object to store my information in related by the absolute index of each node, but I would rather not do it that way.

TIA

Seth
Seth
Top achievements
Rank 1
 answered on 23 May 2011
1 answer
172 views
Hello,

I tried using the BackgroundImage property but it won't show the image.


Thank you for your time.
Minyie
Top achievements
Rank 1
 answered on 20 May 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
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?