Telerik Forums
UI for WinForms Forum
5 answers
273 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
168 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
22 answers
1.6K+ views
Hi people,
Is posible create to CheckBox "DropDownList or ListControl". Any sample?

Thanks

Victor
Nikolay
Telerik team
 answered on 05 Oct 2012
2 answers
102 views
Telerik.WinControls.UI.ChartSeries series1 = new LineSeries();
series1.DataPoints.Add(new CategoricalDataPoint(1, "9/24"));
series1.DataPoints.Add(new CategoricalDataPoint(2, "9/25"));
series1.DataPoints.Add(new CategoricalDataPoint(3, "9/26"));
series1.DataPoints.Add(new CategoricalDataPoint(4, "9/27"));
 
Telerik.WinControls.UI.ChartSeries series2 = new BarSeries();
series2.DataPoints.Add(new CategoricalDataPoint(6, "9/24"));
series2.DataPoints.Add(new CategoricalDataPoint(7, "9/25"));
series2.DataPoints.Add(new CategoricalDataPoint(8, "9/26"));
series2.DataPoints.Add(new CategoricalDataPoint(9, "9/27"));
 
chart.Series.Add(series1);
chart.Series.Add(series2);
I'm trying to get a winforms application to use a secondary y axis.  A thread from 2008 seems to indicate this is possible, and a thread from 2011 seems to indicate that its not possible.

Can I have a secondary Y axis in a winforms app?  If so, how...



Thank you -
Scott
scott
Top achievements
Rank 1
 answered on 05 Oct 2012
2 answers
135 views
Similar to Office 2010 - I would like to have the text "File" appear on the tab/button that displays the Backstage view, rather than an image. Is this possible? If so, how is it done?
Stefan
Telerik team
 answered on 05 Oct 2012
7 answers
903 views
Hello,

I am developing a windows application. Previously I installed telerik controls using installer and all controls were working fine. After I formatted my system I downloaded all required .dll and put them all in assemblies and added all telerik controls in toolbox by drag and drop. I can build my project but when I try to click telerik control I cannot select them. Also when I add new control it gets added in the area where Rad Themes appear; but the control does not appear on the win form.

Also previously I could see Rad Windows Form Application in Add New Project dialog which I don't see now. I am not able to add RadForm now. Thank you for any help.

Regards
Pathan L.
Petar
Telerik team
 answered on 05 Oct 2012
2 answers
184 views
Hello Telerik


I use application.I want to change drop down menu location & size of menu item. I want to display like "Pic1" image. But it is displaying like "Pic2" image. How can I change this?
Thi Han
Top achievements
Rank 1
 answered on 05 Oct 2012
0 answers
103 views
I have been messing around with the q2 2012 release and have noticed that for some reason when I attach a theme to a control I can no longer change the font information. If I add a them to a menu bar and then want the main menu items to be larger and bold it will not let me change the values. If I remove the theme I see the font changes. Is there something I am doing wrong?
Eric Klein
Top achievements
Rank 1
 asked on 04 Oct 2012
0 answers
104 views
I have just started t o mess around with the ribbon control and I seem to be having an odd issue.  I have a User Control that I created with a radgrid on it.  When I load the control into a windows form it looks correct but when I load the cam user control into the main panel of a ribbon form the grid looks like it is disabled.  It works fine, but it is faded and hard to read.  Is there some setting with the ribbon that is doing this?
Eric Klein
Top achievements
Rank 1
 asked on 04 Oct 2012
1 answer
62 views
Good afternoon,
Update my project with Q2 2012 SP2 version, mark me in my project fails the next instruction. Me pudieran decir que cambio?

this.radGridView1.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
Stefan
Telerik team
 answered on 04 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)
Chart (obsolete as of Q1 2013)
Form
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
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
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
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
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?