Telerik Forums
UI for WinForms Forum
5 answers
508 views
I have a radgridview that I want to change the background color of three columns depending on the value of the cells. The following code works great for changing the colors of the cells based on its value, however if i click into the cell all the formatting for that cell is lost. Is there something we are missing here?

Private Sub rgvTimeCards_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles rgvTimeCards.CellFormatting
        Dim amtIndex As Integer = rgvTimeCards.Columns("BillableAmount").Index
        Dim hrsIndex As Integer = rgvTimeCards.Columns("MarkUpHrs").Index
        Dim dollarsIndex As Integer = rgvTimeCards.Columns("MarkUpDollars").Index
        If e.CellElement.ColumnIndex.Equals(hrsIndex) Or e.CellElement.ColumnIndex.Equals(dollarsIndex) Then
            If rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value < 0 Then
                e.CellElement.NumberOfColors = 2
                e.CellElement.BackColor = Color.White
                e.CellElement.BackColor2 = Color.Pink
                e.CellElement.ForeColor = Color.Black
                e.CellElement.DrawFill = True
            ElseIf rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value > 0 Then
                e.CellElement.NumberOfColors = 2
                e.CellElement.BackColor = Color.White
                e.CellElement.BackColor2 = Color.FromArgb(219, 230, 145)
                e.CellElement.ForeColor = Color.Black
                e.CellElement.DrawFill = True
            Else
                e.CellElement.DrawFill = False
            End If
        ElseIf e.CellElement.ColumnIndex.Equals(amtIndex) Then
            If rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value < 0 Then
                e.CellElement.NumberOfColors = 2
                e.CellElement.BackColor = Color.White
                e.CellElement.BackColor2 = Color.Pink
                e.CellElement.ForeColor = Color.Black
                e.CellElement.DrawFill = True
            Else
                e.CellElement.DrawFill = False
            End If
        End If
    End Sub
sanjeev
Top achievements
Rank 1
 answered on 17 May 2011
1 answer
115 views
Hello there. 

I have successfully used the RadScheduler component to display tasks on a daily, weekly and monthly basis. 

If the subject text displayed for the task does not fit onto the item shown in the scheduler, is there a way to make it autosize so all text is visible
Ivan Todorov
Telerik team
 answered on 16 May 2011
1 answer
453 views
There is a nice useful snippet when using standard MS combobox to track current selected item in a table based on the current selected item of the combobox. This snippet can be accessed using VS 2008 and upward i dont know about 2005. (InsertSnippet> Data - LinQ/XML/Desinger/ADO.NET blah blah> Designer Features and ADO.net> ConvertBindingsource.Current to a specific row in a DataTable)

Using the standard VS shipped combobox it works giving me the option to define it like this:
Dim row As MyProjectDataSet.tblStaffRow<br>        row = CType(CType(Me.ComboBoxStaff.SelectedItem, DataRowView).Row, MyProjectDataSet.tblStaffRow)
and then Dim for example put it into a variable like:
myArrayVariable.Add(row.StaffName)

This however doesn't work for telerik q1 2011 winform RadDropDownList. can anyone help me with this?
Peter
Telerik team
 answered on 16 May 2011
3 answers
173 views
Hi,

We would like to use telerik winform controls. So we start to test demo version.
We have a strange issue about the RadComboBoxElement placed on radribbonbar.

When I use the autocompletemod with SuggestAppend option at the first bind something happen with the popup list. (image attached wrong.png). When I click the arrow of the texbox part of the combobox,  the popup hide, after a click again the popup part shows correctly. (image attached good.png)

We use this event:

  
private void comboboxSearchAddress_TextChanged(object sender, EventArgs e)
        {
            if (comboboxSearchAddress.Text.Length > 2)
            {
  
                List<AddressPointType>
                    liAddrs = AddressPoint.SearchAddress(comboboxSearchAddress.Text);
  
                string s = comboboxSearchAddress.Text;
                 comboboxSearchAddress.Text = "";
                 comboboxSearchAddress.Items.Clear();
                for (int i = 0; i < liAddrs.Count; i++)
                {
                     
                    comboboxSearchAddress.Items.Add(new RadComboBoxItem(liAddrs[i].Caption,liAddrs[i]));
  
                }
                comboboxSearchAddress.Text = s;
                comboboxSearchAddress.Select(comboboxSearchAddress.Text.Length, 0);
                
            }
        }



Any Idea appreciate.
Thanks.
Csaba

Stefan
Telerik team
 answered on 16 May 2011
1 answer
219 views
I am looking for any WinForms or WPF Telerik control which is similar to RadEditor for ASP.Net AJAX. That is user can design their page and retrieve the designed page as HTML as in RadEditor.



Boby
Telerik team
 answered on 16 May 2011
7 answers
334 views

Hello.. how are you..

i have the next scene.. i have a grid nest into the other grid i am using the tools to export of telerik.. its a example:

 

public void Export(String sFilepath, RadGridView grvExportExcel)

{

ExportToExcelML exporter = new ExportToExcelML(grvExportExcel);

exporter.SummariesExportOption = SummariesOption.ExportAll;

exporter.RunExport(sFilepath);

}

but its doesn't work .. when i run this function its make the file succesfully but only export the primary grid and the template not...
i need export all information of the grid... if somebody can help me.. i will pleasure.. for your help.

 

public void Export(String sFilepath, GridViewTemplate grvtExportExcel)

{

RadGridView rgvGrid = new RadGridView();

foreach (GridViewDataColumn c in grvtExportExcel.Columns)

{

rgvGrid.Columns.Add(c);

}

foreach (GridViewDataRowInfo d in grvtExportExcel.Rows)

{

rgvGrid.Rows.AddNew(d);

}

ExportToExcelML exporter = new ExportToExcelML(rgvGrid);

exporter.SummariesExportOption = SummariesOption.ExportAll;

exporter.RunExport(sFilepath);

}

}

but its doesn't work neither....

regards...
thanks for your help.

Martin Vasilev
Telerik team
 answered on 12 May 2011
3 answers
134 views
Hello,

I've evaluated your GridView and I'm on the point to buy the WinForms controlls.
But some issues are still unresolved on my site. I'd really appreciate if you can give some advices to the following points:
  • Why is the first line with a TextBox column not painted correctly? After collapse and expand is the content correct
  • For a custom editor I derrive from BaseCustomEditor and the for the element from RadTextBoxItem
    As usual some keys such as backspace or delete are not effecting to the KeyPress event on the RadTextBoxItem. Therefore I tried to override ProcessCmdKey. But the overridden method will be never called
  • When the textbox columns change their values I want also that the bound data is changed. How can I achieve that?
  • In the CellBeginEdit method I set the height of the row to a specific value. But if I set the value above 156px a NullReferenceException is thrown. But why? I want to be able to set every height.

All listed points above have a corresponding todo comment in the attached sample project.
http://www.danflash.com/files/code/GridViewEvaluation.zip

Thank you very much.
Kind regards,
Danny
Alexander
Telerik team
 answered on 12 May 2011
1 answer
91 views
HI,

I have a  winform gridview controls which displays the row details in custom view in the bottom (ref -  custom views winform demo)
I need to to display another grid in custom view.
(see the screen shot attached)

Thanks.
Svett
Telerik team
 answered on 12 May 2011
6 answers
83 views
Hi!

I will like to ask certain thing about upgrade. From starting we are using the Q2 2010 (Trial Version), than we already purchase Q1 2011. So we use the wizard to upgrade the project. On code there is no error, but by performence vice... something was happen.

In Form designer mode. For example, my form designer and porperties is open by side. So when i click on the button the properties will show me the name of the button. But most of the time after i go to code mode and click back the form design, and select some button or ribbon bar it didn't show me the correct name. I also had try to select on other control and select back the control i want to see the name in properties it also didn't show me the correct name. WHY?

One more things when i select the form to view in design mode it populate the control very slow and sometime after finish populate and view the form design, i open the form code mode then select back the form design mode, it was not responsing or hanging...

Im develop my project in Visual Studio 2010 - (VB.NET).
Im using the RibbonBar form.
In the form i had docker, button, ribbonbar, treeview, label, Theme Manager and more...


Regards
Johnny
Stefan
Telerik team
 answered on 12 May 2011
1 answer
122 views
I was curious if there was an easy way to change the "disabled" style of controls like "DateTimePicker", "DropDownListBox",etc.

Basically I want them to be ReadOnly without having to have that Grey backcolor, but obviously just changing the backcolor doesn't work.

Is there a simple way to do this?
Stefan
Telerik team
 answered on 12 May 2011
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?