Telerik Forums
UI for WinForms Forum
2 answers
179 views
Hi.
I encounter with problem for RadDropDownList, with DropDownStyle = DropDownList.
I'm trying to select first element by typing first letter of the element in active control, but it don't work. It works for other elements in list, except first.

Is there any solution for this problem?
Michael
Top achievements
Rank 1
 answered on 09 Oct 2012
1 answer
134 views

I want to drag an ui element from another part of the screen to only the selected row of a gridview. The workflow is that use selects one row on the gridview (row multiselection is disabled) and then drags something on that row.
So only if the mouse cursor is on top of the selected row the cursor should change to DragDropEffects.Link. Any other row, column header, filter header, grouping are etc. should show DragDropEffects.None. I also want to change the row border od the selected row ro green color if possible to indicate that this drop is allowed.

Then I have some business logic to with the AddressBase object in the gridviewinfo.tag of the selected row and the data in the DragEventArgs. So far I have managed to do this in the grid's DragOver event handler. But how do I check that the element at mouse location is within the border of the selected row.

private void PersonMailingGridOnDragOver(object sender, DragEventArgs e)
{
 Point location = PersonMailingGrid.PointToClient(new Point(e.X, e.Y));

 GridDataCellElement element = PersonMailingGrid.ElementTree.GetElementAtPoint(location) as GridDataCellElement;
 
 // check that the element is inside the selected row
 
 if (element != null && !(element is GridFilterCheckBoxCellElement))
 {
  AddressEventArgs data = (AddressEventArgs)e.Data.GetData(typeof(AddressEventArgs));
  AddressBase dragAddress = data.Address;
  AddressBase rowAddress = element.GridViewElement.CurrentRow.Tag as AddressBase;

  _lastDragElement = element.GridViewElement;
  _lastDragElementBackColor = element.RowElement.BackColor;

  if (rowAddress != null && rowAddress.AddressContactType == dragAddress.AddressContactType)
  {
   e.Effect = DragDropEffects.Link;
   element.RowElement.BackColor = _dragStateBorderColourAllowed;
  }
  else
  {
   e.Effect = DragDropEffects.None;
   element.RowElement.BackColor = _dragStateBorderColourNotAllowed;
  }
 }
}

 

 

Svett
Telerik team
 answered on 08 Oct 2012
1 answer
79 views
Hello,

This week we migrated our software from Visual Studio 2008 to 2010. We have a treeview (few places) and it contains an imagelist. Which worked perfectly in VS2008. But now in VS2010 the images are gone and we go back to the basic view with the + and - before a node.

We did not change anything but our own images are not shown anymore. We did not upgrade our Telerik DLL or anything. Just migrated to 2010.

We hope anyone knows a solution.

Thanks,

Niels den Otter
Jack
Telerik team
 answered on 08 Oct 2012
1 answer
285 views
Q1 2012
VS 2010

The following snippet does not run.

private void HightlightText(string textToHighlight)
{
    DocumentTextSearch search = new DocumentTextSearch(this.radRichTextBox.Document);
    foreach (var textRange in search.FindAll(textToHighlight))
    {
        this.radRichTextBox.Document.Selection.AddSelectionStart(textRange.StartPosition);
        this.radRichTextBox.Document.Selection.AddSelectionStart(textRange.EndPosition);
        this.radRichTextBox.ChangeTextHighlightColor(Color.Red);
    }
}


How can I highlight with red color all the occurrences of the text?

Tommaso
Svett
Telerik team
 answered on 08 Oct 2012
1 answer
79 views
I am trying to install my vs2010 windows program on a user's computer.  I have enabled the app to copy over the bin files but I still get a dependency error during installation.  The app also complains about versions.  When I try to install it on a user's computer, I get the following installer error:

http://screencast.com/t/1MEpc4Tr8PQ9

Please assist.
Stefan
Telerik team
 answered on 08 Oct 2012
2 answers
165 views
hello
I use messagebox and set the Rtl=Yes,the text message language is in persian or arabic,then
I want to change the font of messagebox  so I use html in message text
(RadMessageBox.Show(this, "<html><font=Tahoma>سلام دوست من</html>", "title",
            MessageBoxButtons.OK, RadMessageIcon.Info, MessageBoxDefaultButton.Button1, RightToLeft.Yes);)
but when the messagebox is showDialog the Text is  displayed in reverse.
for example i write "سلام دوست من" in textmessage but its shown "من دوست سلام" .
please help me to solve this problem.

Behin
Top achievements
Rank 1
 answered on 06 Oct 2012
1 answer
95 views
Hi

We have a self referencing hierarchical radgrid and would like to make it easier for our users to use it in our application.

Currently we have the following set which crams all the columns into the current view:

grid.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

What we'd like to do is to change this parameter to GridViewAutoSizeColumnsMode.None and allow the user to scroll horizontally but to still keep the hierarchy on the left visible (i.e. freeze the left most column).  Is there a way to do this?

Thanks
Clinton Smyth
Top achievements
Rank 1
 answered on 05 Oct 2012
2 answers
126 views
Hi Telerik team, I working with RadPageView in strip view mode. I this mode the button More show the tooltip “Add New Page”. How I can change this tooltip by another? For example “Add  new playlist” . Thank you ahead of time and sorry for my English
Miguel
Top achievements
Rank 1
 answered on 05 Oct 2012
5 answers
298 views
Hi,
When the program execute the following codes:
 this.radGridView1.Rows[1].Cells[1].Style.DrawFill = true;
 his.radGridView1.Rows[1].Cells[1].Style.NumberOfColors = 1;
 this.radGridView1.Rows[1].Cells[1].Style.CustomizeFill = true;
 this.radGridView1.Rows[1].Cells[1].Style.BackColor = Color.Brown;

all the cells of the second row will trig the cellFormatting event. The performace is low.

Can we avoid it ,and only make the above cell to trig the cellformatting event?


Regrads!
Nikolay
Telerik team
 answered on 05 Oct 2012
1 answer
175 views
I am developing an application where I use the RadGridView to display information from various stores. I use a GridView and show only the information of one store at a time.

In CellFormating'm formatting the text of GridView and am placing an image in the GridView cells when it has a note or comment.

The problem with it is that sometimes CellFormatting puts the image of the note in cells where it is not and does not remove the image of the note when changing store. The data in the GridView if the images are updated but the notes are not removed.

My code is as follows:

//----- Implementación del evento para el formateo de las celdas -----//
private void rgvResOper_CellFormatting(object sender, CellFormattingEventArgs e)
{
int iRenglon, iColumna, iRenCom, iColCom, iElemento1;
string sDato;
Font MiFont001 = new Font(new FontFamily("Verdana"), 6.0F, FontStyle.Bold);

try
{
Cursor.Current = Cursors.WaitCursor;

//--------------------------------------------------------------------------------------------------------------------//
//----- S e   d a   f o r m a t o   a   l a   c e l d a   q u e   s e   e n c u e n t r a   a c t i v a -----//
//--------------------------------------------------------------------------------------------------------------------//
if (e.CellElement.ViewTemplate.Caption == "Información de las Cuentas Contables afectadas por la Póliza")
{
//e.CellElement.DrawFill = true;

e.CellElement.BackColor = Color.FromArgb(240, 240, 255);
e.CellElement.TableElement.RowHeight = 17;
e.CellElement.NumberOfColors = 1;
}
else if (e.CellElement.ViewTemplate.Caption == "Información de las Pólizas que conforman el Concepto")
{
//e.CellElement.DrawFill = true;

e.CellElement.BackColor = Color.FromArgb(240, 255, 240);
e.CellElement.TableElement.RowHeight = 18;
e.CellElement.NumberOfColors = 1;
}
else if (e.CellElement.ViewTemplate.Caption == "")
{
if (e.CellElement.ColumnInfo.HeaderText == "IdConcepto")
{
e.CellElement.Font = MiFont001;
}

if (e.CellElement.Text == "GROSS PROFIT" ||
e.CellElement.Text == "COST" ||
e.CellElement.Text == "OTHERS COST / PROFITS" ||
e.CellElement.Text == "EXTRA POSITIONS" ||
e.CellElement.Text == "OTHERS" ||
e.CellElement.Text == "PROFIT" ||
e.CellElement.Text == "CASH-FLOW Before Corporate Tax" ||
e.CellElement.Text == "EBITDA" ||
e.CellElement.Text == "EBIT")
{
e.CellElement.ForeColor = Color.Maroon;
}

//-------------------------------------------------------------------------------------------------------------------------------------------------//
//----- S e o b t i e n e l a i n f o r m a c i ó n d e l c o m e n t a r i o p a r a c o l o c a r e l m a r c a d o r -----//
//-------------------------------------------------------------------------------------------------------------------------------------------------//
if (this.dtResComentarios.Rows.Count > 0 && this.rgvResOper.Rows.Count > 0)
{
for (iElemento1 = 0; iElemento1 <= this.dtResComentarios.Rows.Count - 1; iElemento1++)
{
if (this.rrbCifrasMes.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
{
if (this.dtResComentarios.Rows[iElemento1]["DescColumna"].ToString() == e.CellElement.ColumnInfo.FieldName.ToString() &&
(Convert.ToInt32(this.dtResComentarios.Rows[iElemento1]["IdConcepto"]) - 1) == e.CellElement.RowIndex &&
iDeptoTda == Convert.ToInt32(this.dtResComentarios.Rows[iElemento1]["IdCtoUtilidad"]))
{
e.CellElement.Image = Image.FromFile(Application.StartupPath + "\\Imagenes\\Iconos\\Nota2.png");
e.CellElement.ImageAlignment = ContentAlignment.MiddleRight;
e.CellElement.TextImageRelation = TextImageRelation.TextBeforeImage;
e.CellElement.TextAlignment = ContentAlignment.MiddleRight;
}
}
}
}
}
else
{
e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.NumberOfColorsProperty, Telerik.WinControls.ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
}

Cursor.Current = Cursors.Default;
}
catch (Exception ex)
{
Cursor.Current = Cursors.Default;
MessageBox.Show(ex.Message.ToString(), "Emisión de Reportes", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

Can you help me please.

Not if worth something if I inform you that I have a license for WinForms controls Tellerik.

Greetings ...
Nikolay
Telerik team
 answered on 05 Oct 2012
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
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?