Telerik Forums
UI for WinForms Forum
3 answers
318 views
Hey at Telerik

I'm struggling to get an export of a hierarchical RadGrid to work properly.

I have included an export example of how it looks now and one how i would like it to look.

Both files can be found here
http://kort2.lifa.dk/publicdownload/ExportToExcel.rar

I would like to hide the column headers of the childtemplates when exporting. Have tried with the ViewCellFormatting and RowCellFormatting events but with no luck.

Hope you can help me with this.

Sincerly Jan
Ivan Petrov
Telerik team
 answered on 30 May 2013
4 answers
175 views
Hi,

I am using GridView with an IQueryable datasource, together with the builtin header filters.
But when filtering, it just filters the loaded memory object instead of the database. 

I have tried to utilize DynamicLinq, by handling the FilterChanging event like this:

Private FilterDescriptors As New List(Of FilterDescriptor)
 
Private Sub GridView1_FilterChanging(sender As Object, e As Telerik.WinControls.UI.GridViewCollectionChangingEventArgs) Handles GridView1.FilterChanging
        e.Cancel = True
        For Each f In e.NewItems.OfType(Of FilterDescriptor)()
            FilterDescriptors.Add(f)
        Next
   LoadData() 'Load data here 
End Sub

Then in the LoadData method I have to parse the FilterDescriptor expressions, but this would take some time to get it right, and implementing the various filter operators in DynamicLinq. E.g. the "LIKE" operator needs to be rewritten as ColumnName.Contains(filter) etc.

If my memory serves correct I believe that KendoUI MVC have some builtin functionality to handle this type of situation.
Do you have anything similar in the WinForms toolkit ?
Or do you recommend a different approach ?

(Using VS2012, .NET4.5, Toolkit v. 2013.1.321.40)
Anton
Telerik team
 answered on 29 May 2013
2 answers
173 views

I am trying to conditionally switch between a Command Bar Button and a Command Bar Drop-Down Button with this code:
  

 

if (A)
{
    if (commandBarStripElement1.Items.Contains(cbbCopy))
    {
        location = commandBarStripElement1.Items.IndexOf(cbbCopy);
        commandBarStripElement1.Items[location] = cbDropDownButtonCopy;
    }
 }
else
{
    if (commandBarStripElement1.Items.Contains(cbDropDownButtonCopy))
    {
        location = commandBarStripElement1.Items.IndexOf(cbDropDownButtonCopy);
        commandBarStripElement1.Items[location] = cbbCopy;
    }

 

The code works fine when A is true, but the second time the function is entered and A is false. I get this error:

System.InvalidOperationException: Element already added

The error is thrown from this line:
 

 

commandBarStripElement1.Items[location] = cbbCopy;

I've debugged in and checked all of the items in commandBarStripElement1 and cbbCopy is not in there. Is there some other way to swap items in the Command Bar while maintaining their position?

 

 

 

Stefan
Telerik team
 answered on 29 May 2013
3 answers
278 views
Ok I am sure this is simple, but cant seem to figure out how to get the index of the current child hierarchy view.

What I am trying to do is move the current view index to the begining of the collection so the export will export the data that the user is currently viewing. 

Thanks
Ivan Petrov
Telerik team
 answered on 29 May 2013
1 answer
223 views

I'm evaluating the Winforms tool and have made a small project to try the RadPropertyGrid component.  Here's the relevant code:

            radPropertyGrid2.PropertySort = PropertySort.CategorizedAlphabetical;

            RadPropertyStore store = new Telerik.WinControls.UI.RadPropertyStore();            

            store.Add(new PropertyStoreItem(typeof(double), "Foobar", 1.234, "ahdfl fdlskhs hjdfd", "Ack"));

            this.radPropertyGrid2.SelectedObject = store;


When I run my project using this code, the category name is not drawn above the property.  See attached picture. I've tried creating properties manually using the PropertyStore, and also by using the [Category] attribute on my selected objects.  Neither seem to work.

Any advice would be greatly appreciated.

NOTE: when I use an object with multiple properties as the selected object, each property appears to get a separate group associated with it, even though the name on each group is blank.
Conrad
Top achievements
Rank 1
 answered on 29 May 2013
2 answers
200 views
Hi there,

I’d like to change the format which the calendar control uses to display the current date, to the left of the "Today" button. (Please see the attached screenshot –  it's the format of the section circled in red which I’d like to change.) I’m specifically trying to use dd/MM/yy and have already tried this:

radDateTimePicker1.Format = DateTimePickerFormat.Custom;

radDateTimePicker1.CustomFormat = "dd/MM/yy";

Would you please describe how to change the date format to the left of the “Today” button?

Thank you,

Ben

Ben
Top achievements
Rank 1
 answered on 28 May 2013
1 answer
164 views
Hi Support,

In my GridView a have a GridViewComboBoxColumn. My application is touch screen and I would like to increase the vertical scroll bar width.

Can you give me some step on how to do this?

Regards,
Nadia
Stefan
Telerik team
 answered on 28 May 2013
3 answers
156 views
Good morning,

after binding a collection (List) of custom object to a gridview (with no problem) i am using ExportToExcelML to export that grid in excel;

it does export only object's property of a "know" type..

Example 

class Car
{
public string Name ;
}


Class Customer
{
public string Name;
public Car Car{get;protected set;}
}

binding radgridview with a List<Customer> and exporting to excel will export just "Name" property and not "Car" , when in the gridview is shown correctly.
 is there any interface i need to implement in my classes? 

Thanks 

Nino
Stefan
Telerik team
 answered on 28 May 2013
7 answers
993 views
hi,

following events are not firing DragDrop, DragOver, DragEnter you will find the code below but it is trivial, all of this events are inhereted from microsoft components but still i would like them to fire.

Anyhow what I need is to check if i can drop node-draged to the one below and I need an event and possibility to change cursor or something like this. Is there a way for doing that ?

thanks

  radTreeView1.DragDrop += new DragEventHandler(radTreeView1_DragDrop);
            radTreeView1.DragEnter += new DragEventHandler(radTreeView1_DragEnter);
            radTreeView1.DragOver += new DragEventHandler(radTreeView1_DragOver);
  

void radTreeView1_DragDrop(object sender, DragEventArgs e)
        {
            Console.WriteLine("dragdrop ");
        }

        void radTreeView1_DragOver(object sender, DragEventArgs e)
        {
            Console.WriteLine("drag over");
        }

        void radTreeView1_DragEnter(object sender, DragEventArgs e)
        {
            Console.WriteLine("drag enter");

        }



Stefan
Telerik team
 answered on 28 May 2013
9 answers
267 views
Telerik,

I am trying to auto fix the casing if a tag is being entered that is already in the AutoCompleteItems list.  I am handling the CreateTextBlock event and keep getting an  object reference not set to an instance of an object. error when trying to create the new TokenizedTextBlockElement.

Maybe there is a better way ?

Private Sub RadAutoCompleteBox_CreateTextBlock(sender As Object, e As CreateTextBlockEventArgs)
 
    If TypeOf e.TextBlock Is TokenizedTextBlockElement Then
        For Each item As RadListDataItem In RadAutoCompleteBox1.AutoCompleteItems
            If item.Text.ToLower = e.Text.ToLower Then
                e.TextBlock = New TokenizedTextBlockElement(item.Text)
                Exit For
            End If
        Next
    End If
 
End Sub

Peter
Telerik team
 answered on 27 May 2013
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?