Telerik Forums
UI for WinForms Forum
1 answer
169 views
Hi,
When I change entire app's theme using associated class, My grid's header font doesn't appear with the font I set for prevous theme. this happens for Win7 and Desert themes. How to solve this? please tell me.
How can I get rid of Telerik theme's header display glitch (shows header gray color and after mouse hover backs to original color(green))?
Thank you again, Tooraj Azizi.
Ivan Petrov
Telerik team
 answered on 04 May 2011
3 answers
217 views
Hi,
In my C# WinForms App I have placed a progress bar on statusbar of Main  form. the progress bar must show the progress of any action such as updating of a sql server table, backup operation, or any calculative operation.
Please put a sample here, thank you.
Tooraj azizi.









Ivan Petrov
Telerik team
 answered on 04 May 2011
1 answer
114 views
When I click on a cell, how can I change the color of the highlight.  Also, how can I change the color of the hover?
Stefan
Telerik team
 answered on 04 May 2011
1 answer
101 views
When I add an appointment to the appointments collection manually, say like this:
Appointment apt = new Appointment();
apt.UniqueId = new EventId(1);
apt.ResourceId = new EventId(1);
apt.Start = DateTime.Now.Date.AddHours(9);
apt.End = apt.Start.AddMinutes(30);
apt.Summary = "Apt Test";
radScheduler1.Appointments.Add(apt);
When I drag that appointment to a new location, there is no "feedback" of where I and currently hovering, so it makes it difficult to know if I'm dropping it in the correct spot.
Stefan
Telerik team
 answered on 04 May 2011
5 answers
488 views
Hello,

I would like to access a specific checkbox value in my grid.
After some hours of searching the correct syntax and way to do it, I come to you for more information.

For example, how can I get the myGrid.row[2].cell["checkbox"] value (where the cell is checkbox) outside of any events?
Actually can cast something somewhere in the cell GridViewCellInfo to get the inner checkbox value?

Thanks

regards
Emanuel Varga
Top achievements
Rank 1
 answered on 03 May 2011
3 answers
116 views
Hello,

I'm actually using a databinding, which has a DataTable as Datasource.

DataTable dataTable = new DataTable();
dataTable.Columns.AddRange(new DataColumn[]{
        new DataColumn("NumeroActe", typeof(string)), 
        new DataColumn("DateActe", typeof(string)), 
        new DataColumn("TypeBien", typeof(string)), 
        new DataColumn("Surface", typeof(decimal)), 
        new DataColumn("Prix", typeof(decimal)), 
        new DataColumn("Pieces", typeof(int)), 
        new DataColumn("EpoqueConstruction", typeof(string)),
        new DataColumn("NumeroRue", typeof(string)),
        new DataColumn("NomRue", typeof(string)),
        new DataColumn("LieuDit", typeof(string)),
        new DataColumn("CodePostal", typeof(string)),
        new DataColumn("Localite", typeof(string)),
        new DataColumn("Maison", typeof(bool)), 
        new DataColumn("Appartement", typeof(bool)), 
        new DataColumn("Terrain", typeof(bool)), 
        new DataColumn("Local", typeof(bool)), 
        new DataColumn("Annexe", typeof(bool)), 
        new DataColumn("Cave", typeof(bool)), 
        new DataColumn("Garage", typeof(bool)),
        new DataColumn("Grenier", typeof(bool))
    });
 
dataTable.BeginLoadData();
 
foreach (DataRow row in table.Rows)
{
    // Create a ExportVenteData according to the current Database row
    ExportVenteManager manager = new ExportVenteManager();
    ExportVenteData tmpExportData = manager.BuildExportVenteData(row);
 
    if (tmpExportData != null && tmpExportData.IsValid())
    {
        // Create the new custom line for the datasource
        DataRow ligne = dataTable.NewRow();
 
        ligne["NumeroActe"] = tmpExportData.NumActe;
        ligne["DateActe"] = tmpExportData.DateActe.ToString("dd/MM/yyyy");
        ligne["TypeBien"] = cTypeFiche.GetLibelle(tmpExportData.TypeBien);
        ligne["Prix"] = tmpExportData.PrixVente;
        ligne["Surface"] = tmpExportData.Surface;
        ligne["Pieces"] = tmpExportData.NbPieces;
        ligne["EpoqueConstruction"] = cLibellesEnums.EpoqueConstruction.ToString(tmpExportData.EpoqueConstruction);
 
        ligne["NumeroRue"] = row["NUMERO_RUE"] != null ? row["NUMERO_RUE"].ToString() : "";
        ligne["NomRue"] = row["NOM_RUE"] != null ? row["NOM_RUE"].ToString() : "";
        ligne["LieuDit"] = row["LIEU_DIT"] != null ? row["LIEU_DIT"].ToString() : "";
        ligne["CodePostal"] = row["CODE_POSTAL"] != null ? row["CODE_POSTAL"].ToString() : "";
        ligne["Localite"] = row["LOCALITE"] != null ? row["LOCALITE"].ToString() : "";
 
        foreach (eTypeFiche fiche in tmpExportData.LstAnnexesSupplementaires)
        {
            switch (fiche)
            {
                case eTypeFiche.ANNEXE:
                    ligne["Annexe"] = true;
                    break;
                case eTypeFiche.ANNEXE_CAVE:
                    ligne["Cave"] = true;
                    break;
                case eTypeFiche.ANNEXE_GRENIER:
                    ligne["Grenier"] = true;
                    break;
                case eTypeFiche.APPARTEMENT:
                    ligne["Appartement"] = true;
                    break;
                case eTypeFiche.GARAGE:
                    ligne["Garage"] = true;
                    break;
                case eTypeFiche.LOCAL:
                    ligne["Local"] = true;
                    break;
                case eTypeFiche.MAISON:
                    ligne["Maison"] = true;
                    break;
                case eTypeFiche.TERRAIN:
                    ligne["Terrain"] = true;
                    break;
            }
        }
 
        dataTable.Rows.Add(ligne);
    }
}
 
dataTable.EndLoadData();

This DataTable is a custom version of SQLServer database format, and suit with my grid (every column is link by name with my databinding columns)

dgvData.MasterTemplate.BeginUpdate();
bdsData.DataSource = _dataTable;
dgvData.MasterTemplate.EndUpdate();


My grid has my databinding as datasource.
Actually everything is fine. (see screen1.png attached)
As you can see in screen1.png, there are some checkboxcolumns in my grid, and I would like to move theses columns to a childrow. (screen2.png)

Is there a way to do this programmatically?
I could already add chilrows


Second point:
Since I use the databinding, I can't interfere anymore on the cellformatting event in order to put my datevalue "01/01/0001" to string.empty.
Any solution as wordaround?

Thanks for your lights

Regards

Thanks a lot
Emanuel Varga
Top achievements
Rank 1
 answered on 03 May 2011
2 answers
151 views
Hi,
Because Telerik have not provided a calculator column or comnponent, I'm going to use DevExpress CalcEdit component but don't know how to use it as editor of my calculator column, any guide?
Thank you.
Stefan
Telerik team
 answered on 03 May 2011
4 answers
96 views
I have an application that uses the drag/drop feature of gridview.  When a cell is dragged from one column onto another, I need the cells from the draggedCell column to shift up, filling in the cell that has been dragged to another column.

I also need the column onto which the cell was dropped to shift downward thereby allowing the dropped cell to be inserted at the row position at which it was dropped.

Thanks for any help and code examples you can provide.
Gabriela
Top achievements
Rank 1
 answered on 03 May 2011
2 answers
84 views
I did a search in the forums and in PITS but didn't find any mention of this. However, I have code that worked with Q3 2010, but no longer works with Q1 2011. You can repro this using the code below:

using System.ComponentModel;
using System.Windows.Forms;
using Telerik.WinControls.Data;
using Telerik.WinControls.UI;
  
namespace PropertyGridExample
{
    public class GridViewFactory
    {
        public RadGridView CreateGridView()
        {
            // Setup gridview with default options
            RadGridView gvResults = new RadGridView();
            gvResults.Dock = DockStyle.Fill;
            //gvResults.AllowAutoSizeColumns = true;
            gvResults.ReadOnly = true;
            gvResults.Text = "Test";
            gvResults.Name = "SearchResults";
            gvResults.EnableSorting = true;
            gvResults.MasterTemplate.EnableSorting = true;
  
            // Setup MasterTemplate
            gvResults.MasterTemplate.AllowAddNewRow = false;
            gvResults.MasterTemplate.AutoGenerateColumns = false;
            gvResults.MasterTemplate.Tag = "Test Template";
  
            gvResults.DataSource = null;
  
            gvResults.TableElement.BeginUpdate();
            gvResults.MasterTemplate.Columns.Clear();
  
            // Setup Columns
            GridViewTextBoxColumn column = new GridViewTextBoxColumn();
            column.Name = "Title";
            column.HeaderText = "Title";
            column.FieldName = "Title";
            column.MinWidth = 50;
            column.MaxWidth = 250;
            column.AutoSizeMode = BestFitColumnMode.DisplayedDataCells;
  
            gvResults.MasterTemplate.Columns.Add(column);
  
            GridViewTextBoxColumn column1 = new GridViewTextBoxColumn();
            column1.Name = "Countries";
            column1.HeaderText = "Countries";
            column1.FieldName = "Countries";
            column1.MinWidth = 50;
            column1.MaxWidth = 250;
            column1.AutoSizeMode = BestFitColumnMode.DisplayedDataCells;
  
            gvResults.MasterTemplate.Columns.Add(column1);
  
            GridViewTextBoxColumn column2 = new GridViewTextBoxColumn();
            column2.Name = "Sites";
            column2.HeaderText = "Sites";
            column2.FieldName = "Sites";
            column2.MinWidth = 50;
            column2.MaxWidth = 250;
            column2.AutoSizeMode = BestFitColumnMode.DisplayedDataCells;
  
            gvResults.MasterTemplate.Columns.Add(column2);
  
            gvResults.TableElement.EndUpdate(false);
  
            // Set the Datasource (Can be any object collection)
            gvResults.DataSource = DataFactoryClass.GetData();
  
            SortDescriptor descriptor = new SortDescriptor();
            descriptor.PropertyName = "Title";
            descriptor.Direction = ListSortDirection.Descending;
            gvResults.SortDescriptors.Add(descriptor);
  
            return gvResults;
        }
    }
}

DataSource can be any collection of objects; I was using a three property object collection (evidenced by the column creations) for simplicity. When this RadGridView is attached to a form as a control, it will *not* sort on the title as suggested, using the current assemblies. Reverting to the older Q3 2010 assemblies works however.

Unfortunately I am not able to revert our code back to the old assemblies, as the new assemblies fix several other major bugs present in the Q3 2010 version. Is there a workaround available or a fix planned soon?

EDIT: (I also just put this in as a support issue.)
Alexander
Telerik team
 answered on 03 May 2011
3 answers
224 views
I have a fairly complicated window layout, and it seems like at some point the resize events from a user resizing the form stop propagating after a while.  In my form I have a RadDock that contains a Document window that contains a PageLayout Control  that contains a SplitterWindow That contains a RadDock. 

Inside the rad dock I have 3 ToolWindows that get resized correctly but I have controls that are dockFilled in these windows these controls are not resized.  So this leads to a bunch of redraw errors and makes the screen look very bad.

I tried a bunch of ways to simplify the layout but each one I tried worked correctly. 
In my sample Application I have Form, main form with the RadDock and DocumentWindows, UITabControl (the RadPageLayout), ReportViewer (the SplitContainer), and EmptySnapshotControls which has the second RadDock which has the resize errors.  On the resize event of the ToolWindows I'm displaying the size of the ToolWindow and also the control that is inside the ToolWindow, so you can tell sometimes the second set of numbers don't change. (when there is more that 1 control side by side)

In my sample app the first view shows the error and I have a few other tabs where I've tried to simplify the layout and they work correctly.  If I take out the splitContainer or remove the PageLayoutControl works fine.  (As you can see in my sample)

Anyway if you can figure out whats going on or can find a workaround I'd be very grateful.

I couldn't attach a zip file to attach my post so I'll try to email it to you.  Let me know if there is a better way for me to do this.

Thanks

Troy
Nikolay
Telerik team
 answered on 03 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)
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?