Telerik Forums
UI for WinForms Forum
2 answers
256 views

Ok, this one's just weird. The Close (X) button on MessageBox's  TitleBar is not working. I click on it and nothing happens.

ds = Telerik.WinControls.RadMessageBox.Show(Me, "Are you sure?", "Clear form", MessageBoxButtons.YesNo, RadMessageIcon.Question, MessageBoxDefaultButton.Button1)

Help.

Edit: interestingly, it's the same with regular (native) MessageBox. As if the button is disabled. But why even show it then?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Oct 2021
1 answer
418 views

Hello,

I would like to display multiline text with a varying text length on my user interface.
As the space on the device display is quite limited, but the displayed text sometimes pretty long, I thought about using a multiline radTextbox or a radRichTextEditor rather than simple labels, as they provide the autoscroll property which would work perfectly for varying text lengthes.
As the textboxes would be there only for displaying purposes (the text shouldn't be editable), i thought their property "focusable = false" would be the solution to prevent the controls from getting focused and therefore from getting edited.
Unfortunately, both the radTextBox and radRichTextEditor stay focusable even if the property is set to false. Also in combination with IsReadOnly = true the controls still gain focus when clicking on them. Is there another property which needs to be modified in combination to make focusable = false work?

Thank you in advance for your help and have a nice day!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Oct 2021
1 answer
85 views

It would be nice if we had 2 more events on the columns as well

TaskBoardColumnCollapsing, TaskBoardColumnCollapsed

These would be necessary when the control is database driven since the TaskBoardColumnCollapsed would trigger a database update for the TaskBoardColumns Table.

If it's already there... can you tell me how I can access that event?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Oct 2021
1 answer
92 views

Hello , i want to see if GridViewMultiComboBox is suitable for our application and i want the end user to type any text gridview multicombo box column and i checked  https://www.telerik.com/forums/editable-values-for-new-row-using-gridviewmulticomboboxcolumn but it is giving me problem after end user type and add new item to dropdown list editor , when i go to different row and try to change selected value og MultiComboBox , it doesnt fire selectedvalue changed ..

Also when you change the selected value of GridviewMultiComboBox column it should automatically get the price of the item , update gridview item price column , and multiply with quantity column and update total column ,,,it does that but after i added new item manually , it doesnt do that ..Code is below ..If you see the pictures , after added dropdown list item , changing the item from the list doesnt effect the price and item number and total column anymore

 

                                                                    

        private void ERPDataForm_Load(object sender, EventArgs e)
        {

                this.radGridView1.MasterTemplate.AutoGenerateColumns = false;
                this.radGridView1.EnableFiltering = false;
                this.radGridView1.MasterTemplate.ShowHeaderCellButtons = false;
                this.radGridView1.MasterTemplate.ShowFilteringRow = false;
                this.radGridView1.MasterTemplate.EnableGrouping = false;
                this.radGridView1.MasterTemplate.AllowAddNewRow = true;
                this.radGridView1.AddNewRowPosition = SystemRowPosition.Bottom;      
                this.radGridView1.AllowAutoSizeColumns = true;
                this.radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

                GridViewDecimalColumn qtyColumn = new GridViewDecimalColumn();
                qtyColumn.Name = "QtyColumn";
                qtyColumn.HeaderText = "Qty";
                qtyColumn.FieldName = "Quantity";
                qtyColumn.DecimalPlaces = 0;
                qtyColumn.TextAlignment = ContentAlignment.MiddleCenter;
                qtyColumn.Width = 80;
                radGridView1.MasterTemplate.Columns.Add(qtyColumn);

                GridViewDecimalColumn itemIDColumn = new GridViewDecimalColumn();
                itemIDColumn.Name = "itemIDColumn";
                itemIDColumn.HeaderText = "Item ID";
                itemIDColumn.FieldName = "ItemID";
                itemIDColumn.DecimalPlaces = 0;
                itemIDColumn.TextAlignment = ContentAlignment.MiddleCenter;
                itemIDColumn.Width = 100;
                radGridView1.MasterTemplate.Columns.Add(itemIDColumn);

       
                DataTable gg = new DataTable();
                gg = CreateDataTable2();
                GridViewMultiComboBoxColumn descriptionColumn = new GridViewMultiComboBoxColumn();
                descriptionColumn.DataSource = gg;
                descriptionColumn.Name = "DecriptionColumn";
                descriptionColumn.HeaderText = "Description";
                descriptionColumn.DisplayMember = "DescX";
                descriptionColumn.FieldName = "ItemID";

                descriptionColumn.ValueMember = "ItemIDX";
                descriptionColumn.DropDownStyle = RadDropDownStyle.DropDown;
                descriptionColumn.AutoCompleteMode = AutoCompleteMode.Suggest;
                descriptionColumn.Width = 500;
                descriptionColumn.AutoSizeMode = BestFitColumnMode.AllCells;          


                radGridView1.MasterTemplate.Columns.Add(descriptionColumn);

                GridViewDecimalColumn itemPriceColumn = new GridViewDecimalColumn();
                itemPriceColumn.Name = "itemPriceColumn";
                itemPriceColumn.HeaderText = "Unit Price";
                itemPriceColumn.FieldName = "ItemPrice";
                itemPriceColumn.DecimalPlaces = 2;
                itemPriceColumn.TextAlignment = ContentAlignment.MiddleRight;
                itemPriceColumn.Width = 120;
                itemPriceColumn.FormatString = "${0:###,###0.00}";

                radGridView1.MasterTemplate.Columns.Add(itemPriceColumn);

                GridViewDecimalColumn itemTotalColumn = new GridViewDecimalColumn("Total Amount");
                itemTotalColumn.Name = "itemTotalColumn";
                itemTotalColumn.HeaderText = "TOTAL";
                itemTotalColumn.FieldName = "ItemTotal";
                itemTotalColumn.Width = 110;
                itemTotalColumn.Expression = "itemPriceColumn * QtyColumn";
                itemTotalColumn.FormatString = "${0:###,###0.00}";
                radGridView1.MasterTemplate.Columns.Add(itemTotalColumn);

                BusinessLayerInvoiceItems BLII = new BusinessLayerInvoiceItems();

                ArrayList al = new ArrayList();
                al = BLII.GetInvoiceItemsbyInvoiceID(INVOICEID);          

                this.radGridView1.DataSource = al;


                this.radGridView1.CellEditorInitialized += new GridViewCellEventHandler(radGridView1_CellEditorInitialized);
               this.radGridView1.EditorRequired += new EditorRequiredEventHandler(radGridView1_EditorRequired);

               this.radGridView1.CellBeginEdit += new GridViewCellCancelEventHandler(radGridView1_CellBeginEdit);       

}

  private DataTable CreateDataTable2()
  {

            DataTable dtable2 = new DataTable();
            //set columns names
            dtable2.Columns.Add("ItemIDX", typeof(System.Int32));
            dtable2.Columns.Add("Descx", typeof(System.String));            
            dtable2.Columns.Add("ItemPrice", typeof(System.String));
            dtable2.Columns.Add("ItemQuantity", typeof(System.String));


            BusinessLayerItem BLC = new BusinessLayerItem();
            ArrayList al = new ArrayList();
            Item c = new Item();


            al = BLC.GetItems();

            DataRow drowX = dtable2.NewRow();

            drowX["ItemIDX"] = -1;
            drowX["DescX"] = "";            
            drowX["ItemPrice"] = "";
            drowX["ItemQuantity"] = "";
            dtable2.Rows.Add(drowX);


            for (int i = 0; i < al.Count; i++)
            {



                //Add Rows
                DataRow drow = dtable2.NewRow();

                drow["ItemIDX"] = ((Item)al[i]).ItemId;
                drow["DescX"] = ((Item)al[i]).ItemName.ToUpper();                
                drow["ItemPrice"] = ((Item)al[i]).ItemPrice;
                drow["ItemQuantity"] = ((Item)al[i]).ItemQuantity;
                dtable2.Rows.Add(drow);


            }
            return dtable2;
        }

 

        protected void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
        {
            if (e.EditorType == typeof(RadMultiColumnComboBoxElement) )
            {
                if (!isrowadded)
                {
                    e.EditorType = typeof(CustomRadMultiColumnComboBoxElement);                    
                    isrowadded = false;
                }
                else
                {
                    e.EditorType = typeof(RadMultiColumnComboBoxElement);
                }

            }
        }

        protected void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
        {
            RadMultiColumnComboBoxElement mccbEditor = e.ActiveEditor as RadMultiColumnComboBoxElement;

            if (mccbEditor != null)
            {
                FilterDescriptor descriptor = new FilterDescriptor("DescX", FilterOperator.StartsWith, null);
                mccbEditor.EditorControl.FilterDescriptors.Add(descriptor);              
                mccbEditor.AutoSizeDropDownToBestFit = true;
            }            

        }

        bool isColumnAdded;
        void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
            if (this.radGridView1.CurrentColumn is GridViewMultiComboBoxColumn)
            {
                if (!isColumnAdded)
                {
                    isColumnAdded = true;
                    RadMultiColumnComboBoxElement editor = (RadMultiColumnComboBoxElement)this.radGridView1.ActiveEditor;
                    editor.EditorControl.MasterTemplate.AutoGenerateColumns = false;
                    editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("ItemIDX"));
                    editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("DescX"));
                    editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("ItemPrice"));
                    editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("ItemQuantity"));
                    editor.AutoSizeDropDownToBestFit = true;           


                    editor.SelectedIndexChanged += new EventHandler(ProcCode_multiColumnComboElement_SelectedIndexChanged);

                }
            }
        }


        void ProcCode_multiColumnComboElement_SelectedIndexChanged(object sender, EventArgs e)
        {

            if (radGridView1.ActiveEditor is RadMultiColumnComboBoxElement)
            {
                RadMultiColumnComboBoxElement multiColumnComboElement = (RadMultiColumnComboBoxElement)radGridView1.ActiveEditor;

                    GridViewRowInfo row = multiColumnComboElement.EditorControl.CurrentRow;
                    if (row != null)
                    {
                        radGridView1.CurrentRow.Cells[1].Value = row.Cells[0].Value;
                        radGridView1.CurrentRow.Cells[3].Value = row.Cells[2].Value;                 
                    }

             }                         

   
        }

        bool isrowadded = false;

        private void radGridView1_UserAddedRow(object sender, GridViewRowEventArgs e)
        {     
            GridViewRowInfo rowX = e.Row;
            rowX.Tag = "new row";
            isrowadded = true;
            this.radGridView1.CurrentRow = this.radGridView1.Rows[this.radGridView1.Rows.Count - 1];

        }     

Custom CLASS Below

public class CustomRadMultiColumnComboBoxElement : RadMultiColumnComboBoxElement

    {


        public CustomRadMultiColumnComboBoxElement()

        {

            this.AutoFilter = true;

        }

        protected override Type ThemeEffectiveType

        {

            get

            {

                return typeof(RadMultiColumnComboBoxElement);

            }

        }


   


        public override void ProcessReturnKey(System.Windows.Forms.KeyEventArgs e)

        {

            try

            {

                string text = this.Text;


                if (!string.IsNullOrEmpty(text))

                {


                    GridViewRowInfo newCurrentRow = this.FindItemExact(text) as GridViewRowInfo;


                    if (newCurrentRow == null)

                    {

                        this.AddTextAsRow(text);

                    }

                }


                base.ProcessReturnKey(e);

            }

            catch (Exception ex)

            {

                base.ProcessReturnKey(e);

            }

        }


        public override object Value

        {

            get

            {

                this.AddTextAsRow(this.Text);

                return base.Value;

            }

            set

            {

                base.Value = value;

            }

        }


        private int id = 0;

        private void AddTextAsRow(string text)

        {

            for (int i = 0; i < this.EditorControl.Rows.Count; i++)

            {


                GridViewRowInfo newCurrentRow = this.EditorControl.Rows[i] as GridViewRowInfo;

                string trr = newCurrentRow.Cells[1].Value.ToString();

                if (trr == Text.Trim() || Text.Trim()=="")

                {

                    return;

                }

            }


            

            GridViewDataRowInfo row = (GridViewDataRowInfo)this.EditorControl.Rows.AddNew();

            row.Cells["ItemIDX"].Value = id;

            row.Cells["DescX"].Value = text;

            row.Cells["ItemPrice"].Value = id;

            row.Cells["ItemQuantity"].Value = id;



           // this.EditorControl.Rows.Add(id, text);

            

            id++;

        }

    }

                                                                                  
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Oct 2021
1 answer
254 views

Hi!

I followed the instructions for creating an Azure web bot resourse and used the Secret in my winform app. I dropped a RadChat control on my form and gave it the information about the azure web bot. Basically, I followed the directions on your site about this subject.

What I'm confused about is where is the websocket hub to handle my chat messages? Azure wants me to specify the endpoint for the bot. Am I supposed to create a separate web api project to handle the incoming. If that's the case, why do I need azure. I could just create a SignalR hub and write a simple client to handle chat traffic.

Just need some clarity of the what the intent of the RadChat control is and it should be used. I have a Winforms app that will be used by patrol officers in their cars and want to simply chat with other officers using our program.

Thanks in advance!

Todor
Telerik team
 answered on 12 Oct 2021
1 answer
149 views

Just letting you know that it's not listed here... 

RadDragDropService | Telerik Presentation Framework | Telerik UI for WinForms

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Oct 2021
1 answer
140 views

These two events do not appear in the VS Events Property Grid

TaskCardSelecting

TaskCardSelected

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Oct 2021
1 answer
194 views

Hello,

I want to change the 'Dock Button' image in the floating window of RadDock. I tried setting it to the RadImageButtonElement.Image and also RadImageButtonElement.ImagePrimitive.Image. But still, it is not working. How do we change it ?

dockButton.AutoSize = false;
dockButton.Size = new Size(24, 14);
dockButton.DisplayStyle = DisplayStyle.Image;
dockButton.Image = Resources.Pin;               
dockButton.ButtonFillElement.BackColor = Color.Transparent;
dockButton.ImagePrimitive.AutoSize = false;
dockButton.ImagePrimitive.Size = new Size(14, 14);
dockButton.ImagePrimitive.Image = Resources.Pin;

Dimitar
Telerik team
 answered on 11 Oct 2021
1 answer
135 views

I don't see TaskBoard and RadFilterView in the toolbox even though it says it's in the latest release.

Is it only for .Net 5 and above - that doesn't seem to be mentioned in the documentation or release notes.

If it can be used in .NET 4.x - how can I manually add them to the toolbox?  What .dll to I use to add them?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Oct 2021
1 answer
208 views

Is there any way we can add a context menu to a card?

It would be nice to be able to be able to right-click on a card and have a context menu so that we can modify portions of the Card. 
E.g.,
Add/Remove User
Update Title
Update Sub Title
Add/Remove Tags

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Oct 2021
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?