Telerik Forums
UI for WinForms Forum
1 answer
332 views
I'm working on a windows application where I've implemented the telerik controls.

I have a  radgridview , and I've added 4 columns to it during the design time.
They are

GridViewComboBoxColumn
GridViewTextColumn
another two GridViewComboboxColumn.

The first GridViewComboBox column is bound to a datasource and it displays all the desired results.
The last two GridViewComboBox's are bound to string of arrays.

I've added around three blank rows to the grid.

So when the user has entered the details to the first three rows, I wanted a new blank row to be added automatically.

On which event should I write my code to add a new blank row automatically?
How to know that the user has finished adding details to the first three rows?

 Please help me know how to do it.

Any help on this will be really appreciated.

Thanks.

Stefan
Telerik team
 answered on 08 May 2013
3 answers
167 views

Hi Telrik,

I’m in the process of evaluating the suitability of the Telrik tools for our development and very happy with the outcome.  There is one more critical control that we need is the Funnel Chart.  Is it available for WPF?  If it is, how do I use it please?

Thanks,
Bramen.

Ves
Telerik team
 answered on 08 May 2013
1 answer
145 views
We recently upgraded our WinForms controls from Q2 2011 to Q1 2013 and now have an issue when opening many of the windows forms. The Error is: Unable to cast object of type ‘Telerik.WinControls.UI.RadButton’ to type ‘Telerik.WinControls.RadControl’. Does anyone have any information on what could be causing this error? Thank you for your help.
Bonnie
Top achievements
Rank 1
 answered on 07 May 2013
3 answers
164 views
I can't seem to get the vertical scrollbar to work in monthview. I can make it visible, but it doesn't want to scroll the scheduler. Autoscroll doesn't seem to do it.

Any ideas?
Peter
Telerik team
 answered on 07 May 2013
3 answers
181 views
Hi,
is there a way to make the right header in the RadPrintDocument right aligned so if i have mixed language text (hebrew and english in my case) It will show it right...

currently i use this function (partly taken from this site - c-sharp-split-and-revers-sentence-with-two-languages):
public static string ProcessEnglishHebrewSentence(string sentence)
        {
            var ret = new List<string>();
            string[] words = sentence.Split(' ');
 
            var curHebrewList = new List<string>();
            var curEnglishList = new List<string>();
            bool curLangIsHebrew = false;
            string w;
            string reversed;
 
            for (int i = words.Length; i > 0; i--)
            {
                w = words[i - 1];
                if (System.Text.RegularExpressions.Regex.IsMatch(w, @"\p{IsHebrew}") && curLangIsHebrew) // we have a word in Hebrew and the last word was in Hebrew too
                {
                    curHebrewList.Add(w);
                }
                else if (System.Text.RegularExpressions.Regex.IsMatch(w, @"\p{IsHebrew}") && !curLangIsHebrew) // we have a word in Hebrew and the last word was in English
                {
                    if (curEnglishList.Any())
                    {
                        curEnglishList.Reverse();
                        ret.AddRange(curEnglishList);
                    } // reverse current list of English words and add to List
                    curEnglishList = new List<string>(); // create a new empty list for the next series of English words
                    curHebrewList.Add(w);
                    curLangIsHebrew = true; // set current language to Hebrew
                }
                else if (!System.Text.RegularExpressions.Regex.IsMatch(w, @"\p{IsHebrew}") && !curLangIsHebrew) // we have a word in English and the last word was in English
                {
                    if (System.Text.RegularExpressions.Regex.IsMatch(w, @"[a-zA-Z]"))
                    {
                        reversed = new string(w.Reverse().ToArray());
                        reversed = reversed.Replace("(", "^");
                        reversed = reversed.Replace(")", "(");
                        reversed = reversed.Replace("^", ")");
                    }
                    else
                        reversed = w;
 
 
                    curEnglishList.Add(reversed); // reverse and add it to the current series of English words
                }
                else if (!System.Text.RegularExpressions.Regex.IsMatch(w, @"\p{IsHebrew}") && curLangIsHebrew) // we have a word in English and the last word was in Hebrew
                {
                    if (curHebrewList.Any())
                    {
                        curHebrewList.Reverse();
                        ret.AddRange(curHebrewList); // add current list of Hebrew words to List of Lists
                    }
                    curHebrewList = new List<string>(); // create a new empty list for the next series of Hebrew words
 
                    if (System.Text.RegularExpressions.Regex.IsMatch(w, @"[a-zA-Z]"))
                    {
                        reversed = new string(w.Reverse().ToArray());
                        reversed = reversed.Replace("(", "^");
                        reversed = reversed.Replace(")", "(");
                        reversed = reversed.Replace("^", ")");
                    }
                    else
                        reversed = w;
 
                    curEnglishList.Add(reversed);
                    curLangIsHebrew = false; // set current language to English
                }
                else
                {
                    throw new Exception("there should be no other case...");
                }
            }
            if (curHebrewList.Any())
            {
                curHebrewList.Reverse();
                ret.AddRange(curHebrewList);
            }
            if (curEnglishList.Any())
            {
                curEnglishList.Reverse();
                ret.AddRange(curEnglishList);
            }
 
            return ret.Aggregate((a, b) => a + " " + b);
        }

I would like to know if there is a more elegant sollution
Ivan Petrov
Telerik team
 answered on 07 May 2013
3 answers
340 views

Helo !

I used RadTextBoxControl in winforms.(win7, .net4.0)
I used this control to search records (Text box to search records with autocomplete feature).

Now, i want my autocomplete to be similar as of google search box works.
like, the moment i started typing text in the textboxcontrol the first matching record should appear as watermark, instead of highlighted and selected.This autocomplete records being pulled from database.

While typing the text in radtextboxcontrol, the matching characters should be highlighted with bold fonts and the rest characters from matching records should be watermarked. Contents being displayed in dropdown should be inversely formatted with respect to contents in textbox(e.g. matching characters should be watermarked and rest should be bold)

For illustration of my problem you may have look on google searchtextbox.

Looking ahead for your response.

Thanks,
Arpus

Stefan
Telerik team
 answered on 07 May 2013
1 answer
157 views
Is there a way to use the default "pushpin" icons pictured in the documentation for RadToggleButton?
Will
Top achievements
Rank 1
 answered on 06 May 2013
1 answer
485 views
How would I change the font size of my RadGridView, but keep the default font size of the header row - column headers?
Paul
Telerik team
 answered on 06 May 2013
1 answer
166 views
First of all let me apologize for what is probably a easy to answer question. I am unsure of what I need to do for the next step in getting the update to fire and get posted to the SQL DB. This is about the last thing I need to do to have this app finished. I have all the other code needed done. 

I have the radgridview1 already being filled by a dataset. How or rather what is the best way to get the updates posted to the db? I have done my app in C#. In this grid I am forcing the user to do a cell selection to make each change in the row.

Any help you could offer would be greatly appreciated. 

Tom
Peter
Telerik team
 answered on 06 May 2013
11 answers
569 views
Hi !
I have used a dropdownlist in the Gridview column's header for selecting column name. I have created a custom dropdownlist in creating a header cell class which I am using at GridView Column's Header. I am getting problem when I am selecting any value in dropdownlist and when I am moving scroll bar of gridview then its value getting reset automatically. I want to select column name from dropdownlist in header cell. Kindly, find the code I am using and Images related to problem.

public class MyHeaderCellElement : GridHeaderCellElement
   {
       GridViewColumn _col;
     public MyHeaderCellElement(GridViewColumn col, GridRowElement row)
           : base(col, row)
       {
           _col = col;
          this.TextAlignment = ContentAlignment.TopCenter;
       }
       RadDropDownListElement dropDownListElement1;
       RadCheckBoxElement checkBox1 = new RadCheckBoxElement();
 
       protected override void CreateChildElements()
       {
           base.CreateChildElements();
           if (dropDownListElement1 == null || dropDownListElement1.DataSource == null)
           {
               dropDownListElement1 = new RadDropDownListElement();
              checkBox1.StretchHorizontally = true;
               checkBox1.ToggleStateChanged += new StateChangedEventHandler(checkBox1_ToggleStateChanged);
               this.Children.Add(checkBox1);
               dropDownListElement1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
              List<string> lst = solusDataAccess.GetMasterFields(solusGeneric.strConnectionString).AsEnumerable().Select(x => x[0].ToString()).ToList();
               dropDownListElement1.DataSource = lst;
               dropDownListElement1.Margin = new Padding(15, 0, 0, 0);
               dropDownListElement1.StretchHorizontally = true;
               dropDownListElement1.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(dropDownListElement1_SelectedIndexChanged);
               this.Children.Add(dropDownListElement1);
           }        
       }
 
       void checkBox1_ToggleStateChanged(object sender, StateChangedEventArgs args)
       {
           if (solusGeneric.dicStrColumnFlag.ContainsKey(_col.Name))
               solusGeneric.dicStrColumnFlag.Remove(_col.Name);
           solusGeneric.dicStrColumnFlag.Add(_col.Name, checkBox1.Checked);
       }
 
            public override bool IsCompatible(GridViewColumn data, object context)
       {
           return data is GridViewTextBoxColumn && context is GridHeaderCellElement; ;
       }
 
       protected override Type ThemeEffectiveType
       {
           get
           {
               return typeof(GridHeaderCellElement);
           }  
       }
   }

Thanks and Regards
Achyut 
Stefan
Telerik team
 answered on 06 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
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
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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?