Telerik Forums
UI for WinForms Forum
7 answers
607 views
Hello.  I would like to add a "Save As" button and an "Email" button to the RadPdfViewerNavigator.  Is this possible to do?
Nadya | Tech Support Engineer
Telerik team
 answered on 18 Oct 2023
1 answer
66 views

Hi, new to telerik, we're evaluating rad chat for an internal chat piece to our app.

i'm looking for recommendations for what control to pair with the radchat control for the left side of the chat program. the one where you pick who you're talking to currently.  think any old messenger app, conversations on the left, and the main chat with a person on the right.

what would you guys use for that?  I only need it to show the person's name, the person that's selected and something like a dot or overlay showing conversations you haven't seen yet.  Like XYZ sent you a chat and you haven't looked at it yet so XYZ's entry shows a dot etc for a missed chat.

this is all winforms.

Thanks!

Dinko | Tech Support Engineer
Telerik team
 answered on 18 Oct 2023
2 answers
61 views

Hello!

I'm struggeling tracking move actions via the DragStarting, DragEnding & DragEnded event of the RadTreeView control.

The informatin provided by the event args are nearly impossible to use, as they are inconsitent as it looks like. Probably I just miss something, but that's why I'm writing this here. :)

What I need:

I need to check if the previous Node in the previous parent can be dropped to the new parent at the new position. This is a more complex check I can't explain in detail, but to clarify: I need ...

  • the old parent
  • the old index of the node within the old parent
  • the new parent
  • the new index of the node in the new parent

Current limits

I can't get all those infos at the DragEnding nor in the DragEnded event. At the moment:

  • Only the DragEnded event have 100% accurate infos about the new parent and new new index of the node in the new parent.
  • Only the DragEnding event has 100% accurate infos about the old parent and the old index of the node.

What I do now is not well done:

  • On DragEnding don't use the "Controller.Allow..." methods to see if the actions "Controller.Move..." and "Controller.SetNewEntilityParent" will succes. Instead I just catch the exception.
  • The exact destination I can't really track. So, I do some hacky checks to suppose the new parent and the new index of the node in the new parent. This is still not accurate and still lead to IndexOutOfBoundExceptions that the try-catch also catches.

My question

Is there any way to either track down the accurate new parent and the new index of the node in the new parent on the DragEnding event? I need to know them to cancel the drag event if the action is not allow and very specific cases.

Thank you in advance for an answer! We hope to get a solution soon. I already spend a lot of hours (several days) to this issue without a good solution.

This might also be a support ticket, but maybe someone of the community have a similar issue or already have a workaround/solution for it.

Code sample of a current implementation:

private void RadTreeView_BgrTree_DragStarting(object sender, RadTreeViewDragCancelEventArgs e)
{
    if (e.Node is not null)
    {
        oldNodeIndex = e.Node.Index;
        oldNodeParent = CheckForRootNode(e.Node.Parent);
    }
}

private void RadTreeView_BgrTree_DragEnding(object sender, RadTreeViewDragCancelEventArgs e)
{
    IMatrixTarget draggingTarget = e.Node?.Tag as IMatrixTarget;
    Entility newParentEntility = null;
    int indexToInsert = 0;

    void insertInSameParent(int offset)
    {
        if (e.TargetNode.Parent is not null)
            newParentEntility = CheckForRootNode(e.TargetNode.Parent)?.Tag as Entility;
        indexToInsert = e.TargetNode.Index + offset;
    };

    void insertAsChild(int offset)
    {
        if (e.TargetNode is not null)
            newParentEntility = CheckForRootNode(e.TargetNode)?.Tag as Entility;
        indexToInsert = newParentEntility.Childs.Count;
    };

    switch (e.DropPosition)
    {
        case DropPosition.BeforeNode:
            insertInSameParent(0);
            break;
        case DropPosition.AfterNode:
            {
                if (ReferenceEquals(e.TargetNode.Parent, e.Node.Parent))
                {
                    if (draggingTarget is Entility draggingEntility && draggingEntility.Index > e.TargetNode.Index)
                        insertInSameParent(0);
                    else
                        insertInSameParent(-1);
                }
                else if (draggingTarget is Entility && ReferenceEquals(((Entility)draggingTarget).Parent, e.TargetNode.Tag))
                    insertAsChild(-1);
                else
                    insertAsChild(0);
                break;
            }
        case DropPosition.AsChildNode:
            insertAsChild(0);
            break;
    }

    if (newParentEntility is not null)
    {
        try
        {
            if (draggingTarget is Einfluss)
                Controller.MoveIMatrixTarget(draggingTarget, indexToInsert);
            else if (draggingTarget is Entility entility)
                Controller.SetNewEntilityParent(newParentEntility, new[] { entility }, indexToInsert, false, false);
        }
        catch (Exception)
        {
            e.Cancel = true;
        }
    }
}

Nadya | Tech Support Engineer
Telerik team
 answered on 17 Oct 2023
1 answer
139 views

Hi,

We are using RadContextMenu (winforms).
It works fine.

But we would like to remove/hide the icon column because in most cases our items don't have icon/image.

Do you know if it is possible ?

Thanks.

Alain.

Nadya | Tech Support Engineer
Telerik team
 answered on 16 Oct 2023
1 answer
52 views

Hi,
Actually we have made Custom Summary Item for displaying helper text. But we are facing one issue we are displaying helper text in a summary row but that text got truncated from last (i.e. last few characters are missing when displayed).Please have look on below image to have good understanding of issue.
I am providing you the code which we have used. If you need any more information. Please let me know

Code:

Method to set summary row text

                

 private void SetHelpText(string strHelpText)
        {
            if (this.SummaryRowsTop.Count == 0)
            {
                CustomSummaryStatusItem summaryItem = new CustomSummaryStatusItem(this.MasterTemplate.Columns[0].Name, strHelpText + "", GridAggregateFunction.Count);
                GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem();
                // Used to set cell value in GrdData_ViewCellFormatting
                summaryItem.Name = "StatusText|" + strHelpText;

                summaryRowItem.Add(summaryItem);
                this.SummaryRowsTop.Add(summaryRowItem);
            }
            else
            {
                var summaryRowTop = this.SummaryRowsTop[0];
                var summaryItem = summaryRowTop[0] as GridViewSummaryItem;
                summaryItem.Name = "StatusText|" + strHelpText;
            }

            var summaryRowIndex = this.MasterView.SummaryRows.IndexOf(this.SummaryRowsTop[0]);
            this.MasterView.SummaryRows[summaryRowIndex].PinPosition = PinnedRowPosition.Top;
            this.MasterView.SummaryRows[summaryRowIndex].IsVisible = true;

            this.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;
            this.MasterTemplate.BottomPinnedRowsMode = GridViewBottomPinnedRowsMode.Fixed;
        }

 

Custom Summary Item:

public class CustomSummaryStatusItem : GridViewSummaryItem
    {
        public CustomSummaryStatusItem(string name, string formatString, GridAggregateFunction aggregate)
        : base(name, formatString, aggregate)
        { }
        public override object Evaluate(IHierarchicalRow row)
        {
            return 1;
        }
    }

Below Attached Image will help you to know more about issue. Please have a look on them.
Actual Text Dispalyed


Expected Text To Display
Thanks,
Shubham Jain

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Oct 2023
3 answers
52 views

Is there a way to call the Telerik 'insert chart' dialog for a RadSpreadsheet?

I don't want to include the whole ribbon bar, as it has lots of options which would make a mess of my data if a user tried to use it, but I'd REALLY like to let them to be able to add charts.

Otherwise, ss I had to do with the find/replace dialog, I'll have to replciate your UI, which is silly.

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Oct 2023
1 answer
47 views

Is there a way we can put the record count in each group title after grouping on a column in the Grid after the user drags the column to the GROUP BY row?

See exmple

 

TIA.

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Oct 2023
1 answer
98 views
Hi, I have a need for the user to be able to select an rectangular area from a PDF page from within the PDF viewer and then to extract this area as an image. Is this possible? If so how?
Dinko | Tech Support Engineer
Telerik team
 answered on 12 Oct 2023
8 answers
537 views
Hi,

Is there any way to best fit the Radgrids filter popup width? Now when i click filter button , filter popups with available values..If value is long i have to do horizontal scrolling to read the value.I dont want to that..

Thanks
Nadya | Tech Support Engineer
Telerik team
 answered on 12 Oct 2023
1 answer
104 views

In my application, I'm able to bind a TreeView to a Well object in my application through object-relational binding as such:

this.wellTreeView = new RadTreeView();

BindingList<Well> wells = new BindingList<Well>() { well }; this.wellTreeView.DataSource = wells; this.wellTreeView.DisplayMember = "name\\name\\name"; this.wellTreeView.ChildMember = "wells\\layers\\items";

This works and I am able to view the TreeView hierarchy and select the nodes in the form. However, when trying to get the nodes in code, the wellTreeView is empty (0 nodes) and throws an Index out of range error in:

RadTreeNode node = wellTreeView.Nodes[0];

My Well class is defined like so:

public class Well
{
    public string name {get; set;}
    public List<Layer> layers {get; set;}
}

public class Layer
{
    public string name {get; set;};
    public List<Item> items {get; set;}
}

public class Item
{
    public string name {get; set;};
    public decimal length {get; set;}
}

I don't understand why the wellTreeView is empty without any nodes despite being able to view the tree in the form. Surely the well is bound to the TreeView?



Dinko | Tech Support Engineer
Telerik team
 answered on 11 Oct 2023
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?