Telerik Forums
UI for WinForms Forum
6 answers
314 views

Hello,

I'm using the very good built in serch function AllowSearchRow.
However I have it hidden by default and made it possible to use via a menu and a RadShortcut.
When the user clicks the menu (button in my sample below) I would like the SearchRow to show and put focus to the searchbox textbox. But the searchCell is null when the SearchRow is shown.
I suppose I need to put the AllowSearchRow = true and the searchCell.SearchTextBox.Focus() in two different Events, but which ones?

Any suggestions appretiated!

My sample:

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Telerik.WinControls.UI;
 
namespace SearchTextBoxFocus
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            List<MyObject> myList = new List<MyObject>();
            myList.Add(new MyObject(1, "Outdoor"));
            myList.Add(new MyObject(2, "Hardware"));
            myList.Add(new MyObject(3, "Tools"));
            myList.Add(new MyObject(4, "Books"));
            myList.Add(new MyObject(5, "Appliances"));
            radGridView1.DataSource = myList;
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            this.radGridView1.AllowSearchRow = !this.radGridView1.AllowSearchRow;
 
            GridSearchCellElement searchCell = radGridView1.TableElement.GetCellElement(radGridView1.MasterView.TableSearchRow, null) as GridSearchCellElement;
            if (searchCell != null)
            {
                searchCell.SearchTextBox.Focus();
            }
        }
    }
}
public class MyObject
{
    public MyObject(int myInt, string myString)
    {
        _myInt = myInt;
        _myString = myString;
    }
    private int _myInt;
    public int MyInt
    {
        get { return _myInt; }
        set { _myInt = value; }
    }
    private string _myString;
    public string MyString
    {
        get { return _myString; }
        set { _myString = value; }
    }
}

Jan
Top achievements
Rank 1
 answered on 16 Jun 2016
1 answer
254 views

As I can build a table in code that handles at will the borders of the cells. Not manage to control how I want the borders.

 

TableBorders bordetabla = new TableBorders();
bordetabla.SetBottom(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
bordetabla.SetLeft(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
bordetabla.SetRight(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
bordetabla.SetTop(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
bordetabla.SetInsideHorizontal(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
bordetabla.SetInsideVertical(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
 
 
TableCellBorders bordeBajo = new TableCellBorders();
bordeBajo.SetBottom(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
bordeBajo.SetLeft(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
bordeBajo.SetRight(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
bordeBajo.SetTop(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
bordeBajo.SetInsideHorizontal(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
bordeBajo.SetInsideVertical(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
 
 
TableCellBorders Sinborde = new TableCellBorders();
Sinborde.SetBottom(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
Sinborde.SetLeft(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
Sinborde.SetRight(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
Sinborde.SetTop(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
Sinborde.SetInsideHorizontal(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
Sinborde.SetInsideVertical(new Border(Telerik.WinForms.Documents.Model.BorderStyle.None));
 
TableCellBorders todoborde = new TableCellBorders();
todoborde.SetBottom(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
todoborde.SetLeft(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
todoborde.SetRight(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
todoborde.SetTop(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
todoborde.SetInsideHorizontal(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
todoborde.SetInsideVertical(new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, Telerik.WinControls.RichTextEditor.UI.Colors.Black));
 
 
 
 
 
Table tabla;
Paragraph parrafo;
Span bloque;
TableRow fila;
TableCell Celda;
 
tabla = new Table();
tabla.LayoutMode = TableLayoutMode.AutoFit;
tabla.StyleName = RadDocumentDefaultStyles.DefaultNormalTableStyleName;               
//tabla.Borders = bordetabla;
 
 
 
fila = new TableRow();
Celda = new TableCell();
Celda.ColumnSpan = 2;
Celda.Borders = bordeBajo;
parrafo = new Paragraph();
bloque = new Span();
bloque.Text = "PRIMEROS PLATOS";
parrafo.Inlines.Add(bloque);
Celda.Blocks.Add(parrafo);
fila.Cells.Add(Celda);
tabla.Rows.Add(fila);
 
 
fila = new TableRow();
 
Celda = new TableCell();
//Celda.Borders = Sinborde;
parrafo = new Paragraph();
bloque = new Span();
bloque.Text = "2";
parrafo.Inlines.Add(bloque);
Celda.Blocks.Add(parrafo);
fila.Cells.Add(Celda);
 
 
Celda = new TableCell();
//Celda.Borders = Sinborde;
parrafo = new Paragraph();
bloque = new Span();
bloque.Text = "Naranjas de la china";
parrafo.Inlines.Add(bloque);
Celda.Blocks.Add(parrafo);
fila.Cells.Add(Celda);
 
tabla.Rows.Add(fila);

Hristo
Telerik team
 answered on 16 Jun 2016
5 answers
461 views
hi there....

I have one textbox, then i want the autocomplete connect that to mysql database...
so when the user type something, the column in my table on sql database will appear....
Hristo
Telerik team
 answered on 16 Jun 2016
1 answer
140 views

Hi.. this is Deo due to my personal telerik account didn't have any purchase of the product i ask my boss to help me with it and he created this account so i can post my issue on telerik winform..

 

Now the appointment is properly showing up on the radreminder my problem now is using the Open Item button because i have a custom editappointmentdialog and i didn't enable to inherit the overload of constructor to allow the IEvent and ISchedulerData parameter to be past. here is my code.

Private Sub radAppointmentReminder_ItemOpened(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.RadOpenItemArgs) Handles radAppointmentReminder.ItemOpened
 
       If Me.appointmentDialog Is Nothing Then
           ' Me.appointmentDialog = New frmCustomAppointmentEditForm()
           Me.appointmentDialog = New EditAppointmentDialog(CType(e.RemindObject, IEvent), Me.radSchedule)
       End If
 
       Me.appointmentDialog.ShowDialog()
         
   End Sub

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Jun 2016
3 answers
167 views

Hi,

Currently process works as below
1. On button click, new tool window(created dynamically) opened with content.

private ToolWindow CreateToolWindowPanel(string title)
        {
            var panel = new ToolWindow
            {
                CloseAction = DockWindowCloseAction.Close,
                Text = title + " " + counter++,
                Name = "tw " + counter++,
                ToolCaptionButtons = ToolStripCaptionButtons.Close,
            };
            return panel;
        }

on Button MouseDown following code written

var bounds = new Rectangle(Cursor.Position.X - 30, Cursor.Position.Y - 10, 400, 400);
var panel = CreateToolWindowPanel("pnl");
radDock1.FloatWindow(panel, bounds);

2. After the tool window is shown, User docking it (by dragging) to existing radDaocking control.

 

Requirement for changes in this process is Both step need to be done in single click.

On button click new tool window opened with dragging mode(don't release button click and drag tool window), and docked in existing radDaocking control on release of button click.

Thanks

Hristo
Telerik team
 answered on 15 Jun 2016
1 answer
127 views

Hi,

 

Is there any way for implementing editing RadDock trabbed document tabs like radPageView(http://docs.telerik.com/devtools/winforms/pageview/how-to/editing-page-tabs)?

Can any one help for this Issue?

Thanks

Dimitar
Telerik team
 answered on 15 Jun 2016
0 answers
121 views
Good afternoon , I have a small problem , I'm carrying a RadChartView from a database with two fields , but I want the areaserie is painted in colors depending on its value. so far only draws the graph but a single color. attached figure how much I want to paint it.
Good afternoon , I have a small problem , I'm carrying a RadChartView from a database with two fields , but I want the areaserie is painted in colors depending on its value. so far only draws the graph but a single color. attached figure how much I want to paint it.
Good afternoon , I have a small problem , I'm carrying a RadChartView from a database with two fields , but I want the areaserie is painted in colors depending on its value. so far only draws the graph but a single color. attached figure how much I want to paint it.
Electrónica GOIA
Top achievements
Rank 2
 asked on 14 Jun 2016
1 answer
92 views

I have a RadPivotGrid, which users can populate and aggregate data the way the like. Now I want to associate the PivotGrid to my chartView. I followed the simple example to do this, i.e setting the ChartView's datasource to the RadPivotGrid. However, no series are generated.

 

Am I missing something?

 

Br,

Alexander

Dimitar
Telerik team
 answered on 14 Jun 2016
12 answers
686 views
I've been trying to get my listview to sort in unbound mode (where I've added several items manually) and I can't seem to get it working.

I've tried:
uiMasterColourList.SortDescriptors.Add(new SortDescriptor("Text", ListSortDirection.Ascending));
uiMasterColourList.EnableSorting = true;

Basically I'm loading a list of colours from the database and then adding them to two different groups in the listview, along with a checkbox to see if the user has already selected the colour. Works great, but the colours end up a little mixed up and it'd be nice to sort them alphabetically inside their groups.

So this seems like a fairly simple problem, but I seem to be missing something that's making it not work.
Hristo
Telerik team
 answered on 10 Jun 2016
3 answers
450 views

Hello, when using the AllowDragDrop=true on a ListView control, it gives to user a beautiful feedback while doing drag/drop (attached image).

Since i need to implement drag & drop manually, would be possible to draw insert lines on the listview control in "list" view mode?

Would be nice to also have the semiopaque cursor while dragging like on the attached image, but that is not that necessary to me.

The lack of insertion lines in my opinion make not clear for the users where the item will be dropped.

 

Best Regards

Andrea

 

Hristo
Telerik team
 answered on 10 Jun 2016
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?