Telerik Forums
UI for WinForms Forum
1 answer
216 views
Hello,

I'm having an issue using the RadControls inside of an Outlook 2007 Plugin, this is the error I get upon outlook launch.
This works beautifully on the "code" machine, but on virgin machines this is what happens.

Could not load file or assembly 'Telerik.WinControls.UI, Version=8.0.0.0, Culture=neutral, PublicKeyToken=5bb2a467cbec794e' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)
Nick
Telerik team
 answered on 22 Dec 2008
1 answer
164 views
Hi,

I found a bug in summary row calculation.

pRadGridView.MasterGridViewTemplate.SummaryRowsBottom.BeginItemUpdate();
// columns update for a row
pRadGridView.MasterGridViewTemplate.SummaryRowsBottom.EndItemUpdate();

The problem is :
[ GridViewTextBoxColumn ] [ GridViewDataColumn ]
[                                         ] [ GridViewSummaryItem ]

If you change something in the GridViewTextBoxColumn, GridViewSummaryItem is not updated.

Indeed, if there is no GridViewSummaryItem at the bottom of a GridViewTextBoxColumn , BeginItemUpdate don't work.

I have no enought time to do a sample again. If you have any question, tell me.


Jack
Telerik team
 answered on 20 Dec 2008
1 answer
135 views
Hi
I am adding gif files in to my Radcombobox items. But while adding the images, combobox is taking time to load those images.


Please find the following code which I used to populate the images.

RadComboBoxItem item;                   
                         for (int i = 0; i < dtTables.Rows.Count; i++)
                        {
                            item = new RadComboBoxItem();
                            if (dtTables.Rows[i][1].ToString() == "Table")
                            {
                                item.Image = Image.FromFile(imagepath1);
                                item.TextImageRelation = TextImageRelation.ImageBeforeText;
                            }
                            else
                            {
                                item.Image = Image.FromFileimagepath2);
                                item.TextImageRelation = TextImageRelation.ImageBeforeText;
                            }
                            item.Text = dtTables.Rows[i][0].ToString();
                            cbx.Items.Add(item);
                        }

RowCount  will be around 450. If I remove the images then loading data in to the combo box is fast.

Can you please let me know any thing I can do for improving the performance. ?

Thanks in Advance.
Raghu
Nikolay
Telerik team
 answered on 20 Dec 2008
1 answer
118 views
Hi,

deleting column with property builder works fine for all columns but the last one.
 
In the poperty builder it shows deleting the last column correct but in the grid it is visible and not deleted.
Open the property builder again and the deleted column is also visible again.

Greetings,

Ramius
Nick
Telerik team
 answered on 20 Dec 2008
2 answers
484 views

I wanted to know if there is a way to retain grouping, sorting, and filteringg set in a WinForms RadGrid when exporting to Excel.

 

I have a WinForms application that uses the RadGridview to allow users to sort and group items, however currently when they export the data to Excel the data only exports when they do not have any items grouped.

 

I wanted to know how I could allow them to use the RadGridview to group, sort, and filter the items then keep those settings when the data is exported to Excel.  Are there some settings I need to enable in the Gridview itself or modifications that need to be made to the Export sub-routine to allow this.


This is the code that is run when a user clicks the export to Excel button:

 Private Sub btnExportToExcel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExportToExcel.Click  
        If SaveFileDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then 
            If (Not SaveFileDialog.FileName.Equals(String.Empty)) Then 
                Dim file As New FileInfo(SaveFileDialog.FileName)  
                If file.Extension.Equals(".xls") Then 
                    Export(SaveFileDialog.FileName)  
                Else 
                    MessageBox.Show("Invalid file type")  
                End If 
            Else 
                MessageBox.Show("Please enter a file name.")  
            End If 
 
            Me.btnExportToExcel.Enabled = True 
        End If 
 
    End Sub 
    Private Sub Export(ByVal filepath As String)  
        Me.btnExportToExcel.Enabled = False 
        Dim exporter As New ExportToExcelML()  
        Dim exportThemeColors As Boolean = True 
        exporter.RunExport(Me.grdData, filepath, ExportToExcelML.ExcelMaxRows._65536, exportThemeColors)  
        Me.btnExportToExcel.Enabled = True 
        MessageBox.Show("Exporting Finished.")  
    End Sub 
Martin Vasilev
Telerik team
 answered on 20 Dec 2008
1 answer
164 views
Hi,
I've just started working with WinForms so there may just be something I'm missing here - all of my .NET has been Console, Services and ASP.NET until now.   Working in C#.

So I've got a databound grid with a databound lookup column.  Works great, showing the related column.  The problem is when I drag that column up to group by it, I get the value rather than the display value, i.e.  I get the related key value rather than the text displayed in the column, so when grouping by Section column, instead of this

Section: Test
Section: A new section
Section: Test Section

I get:
Section: 1
Section: 2
Section: 3

Where 1, 2,3 are the corresponding keys for Test, A new Section, Test Section.

I would assume I am missing something easy here as this is pretty basic stuff but I can find nothing on the column about what to display when grouping.

Regards,
Nick H
Martin Vasilev
Telerik team
 answered on 20 Dec 2008
1 answer
197 views
 Hi,
I have created a windows form application with just gridview control. My task is that to create/bind textbox and combobox in the same column
Consider the gridview contains two columns
      row[0][0] contains combobox
      row[1][0] contains textbox.
I was successful in creating the above said task.
But my problem is when datas are populated in the gridview such that scrol bar appears. if i scroll down and then scroll up the combobox in the row[0][0] will appear in the row[1][0] and
textbox in the row[1][0]  will appear in the row[2][0]
I have attached the code bellow.

Thanks
Veda

namespace

 

WindowsFormsApplication3

 

 

{

 

public partial class Grid : Form

 

{

 

public Grid()

 

{

InitializeComponent();

}

 

private DataTable dt = new DataTable();

 

 

private void Grid_Load(object sender, EventArgs e)

 

{

 

 

 

    dt.Columns.Add("Value");

 

 

    DataRow dr = dt.NewRow();

 

 

 

 

    dr[0] = "Test";

 

    dt.Rows.Add(dr);

    dr = dt.NewRow();

 

 

 

    dr[0] = "Test1";

 

    dt.Rows.Add(dr);

 


    DataTable
table = new DataTable();

 

    table.Columns.Add(

"Item");

 

    table.Columns.Add(

"Type");

 

    table.Columns.Add(

"Buy/Sell");

 

 

 


    Random
r = new Random();

 

 

    for (int i = 0; i < 5; i++)

 

    {

 

        if(i< 2)

 

            table.Rows.Add(

"Row " + i, 1);

 

 

        else

 

            table.Rows.Add(

"Row " + i, 2);

 

    }

 

    this.radGridView1.DataSource = table;

 

    radGridView1.Columns[1].IsVisible =

false;

 

}

 

 

private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)

 

{

 

    if (e.Row is GridDataRowElement && e.Column.HeaderText == "Buy/Sell")

 

    {

 

            string s = Convert.ToString(e.Row.RowInfo.Cells[1].Value);

 

 

            if (s == "1")

 

            {

                e.CellElement =

new ComboboxCell(e.Column, e.Row,dt,"ComboBox");
            }

 

 

            else if (s == "2")

 

                e.CellElement =

new TextboxCell(e.Column, e.Row, "Hello", "TextBox");

 

    }

}

 

}

 


 

 

public class ComboboxCell : GridDataCellElement

 

{

 

RadComboBoxElement comboBox;

 

 

DataTable table;

 

 

string controlType = string.Empty;

 

 

string text;

 

 

public ComboboxCell(GridViewColumn column, GridRowElement rowElement, DataTable dataTable, string type) :

 

 

base(column, rowElement)

 

{

table = dataTable;

controlType = type;

}
 

 

 

 

protected override void SetContentCore(object value)

 

{

comboBox.SelectedItem = comboBox.FindItem(

Convert.ToString(value));

 

}

 

 

 

 

private void comboBox_SelectedIndexChanged(object sender, EventArgs e)

 

{

}

 


protected
override void Dispose(bool disposing)

 

{

 

    if (disposing)

 

    {

        comboBox.SelectedIndexChanged +=

new EventHandler(comboBox_SelectedIndexChanged);

 

    }

 

    base.Dispose(disposing);

 

}

 

protected override void CreateChildElements()

 

{

 

    if (controlType == "ComboBox")

 

    {

        comboBox =

new RadComboBoxElement();

 

        comboBox.DropDownStyle = Telerik.WinControls.

RadDropDownStyle.DropDownList;

 

        comboBox.DataSource = table;

        comboBox.DisplayMember =

"Value";

 

 

        this.Children.Add(comboBox);

 

    }

 

 

 

}

 

}

 

 

public class TextboxCell : GridDataCellElement

 

{

 

    RadTextBoxElement textBox;

 

 

    string controlType = string.Empty;

 

 

    string text;

 

 

    public TextboxCell(GridViewColumn column, GridRowElement rowElement, string value, string type) :

 

 

    base(column, rowElement)

 

    {

        text = value;

        controlType = type;

    }

 

protected override void Dispose(bool disposing)

 

{

 

    if (disposing)

 

    {

    }

 

    base.Dispose(disposing);

 

}

 


protected
override void CreateChildElements()

 

{

    textBox =

new RadTextBoxElement();

 

    textBox.Text = text;

 

    this.Children.Add(textBox);

 

 

}

 

protected override void SetContentCore(object value)

 

{

    textBox.Text =

Convert.ToString(value);

 

}

}

}

Martin Vasilev
Telerik team
 answered on 19 Dec 2008
6 answers
1.4K+ views
Hi, i am having some trouble setting the appropriate sizes for a radgridview columns. I am using the radgridview as a seperate user control, and loading that user control into one of many radchildforms for an mdi application. Th problem is however that when the gridview is loaded into the radchild from, i would like it to fill the entire child form. I have tried using 

this

 

.radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

But the problem with that is it automatically sizes the columns to be all equal which is not suitable for this application. And in this case giving each column a fixed length is also not an option as this application needs to run on several resolutions. When i tried using 

 this.radGridView1.MasterGridViewTemplate.BestFitColumns(); 

The columns only appear on part of the child form(ie if the user resizes the child form, the columns do not resize with it). So if you could please let me know if there is a workaround. Thanks in advance.

 

 

 

 

 

 

 

Jack
Telerik team
 answered on 19 Dec 2008
1 answer
185 views
Hi,

I found a bug with negative values.

Parameters are :
            //  
            // RadMaskedEditBox_Test 
            //  
            this.RadMaskedEditBox_Test.Culture = null; 
            this.RadMaskedEditBox_Test.EnableKeyMap = true; 
            this.RadMaskedEditBox_Test.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(20)))), ((int)(((byte)(107))))); 
            this.RadMaskedEditBox_Test.Location = new System.Drawing.Point(205, 10); 
            this.RadMaskedEditBox_Test.Mask = "N1"; 
            this.RadMaskedEditBox_Test.MaskType = Telerik.WinControls.UI.MaskType.Numeric; 
            this.RadMaskedEditBox_Test.Name = "RadMaskedEditBox_Test"; 
            this.RadMaskedEditBox_Test.PlaceHolder = ' '; 
            this.RadMaskedEditBox_Test.RightToLeft = System.Windows.Forms.RightToLeft.Yes; 
            //  
            //  
            //  
            this.RadMaskedEditBox_Test.RootElement.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(20)))), ((int)(((byte)(107))))); 
            this.RadMaskedEditBox_Test.Size = new System.Drawing.Size(40, 20); 
            this.RadMaskedEditBox_Test.TabIndex = 23; 
            this.RadMaskedEditBox_Test.Text = "0.0"; 
            this.RadMaskedEditBox_Test.Value = "0"; 



event :
        #region Patches for Telerik 
        /// <summary> 
        /// Max length control 
        /// </summary> 
        private void RadMaskedEditBox_Test_KeyPress(object sender, KeyPressEventArgs e) 
        { 
            if (this.RadMaskedEditBox_Test.Text.Length == 5) 
                e.Handled = true; 
        } 
        #endregion 



Now, just try to set -10.0 on the control.

You'll see that you have 10.0 on Value and -10.0 on Text (normal :p)


I know that's possible to get the value from the text, but for me it's not a "normal" situation.

Best regards


Martin Vasilev
Telerik team
 answered on 19 Dec 2008
5 answers
498 views
Greetings,

I would like to add a "Help" button to the form titlebar, right next to the standard Minimize, Maximize, Close buttons. Is there any way to do this?

Thanks,

Silviu
Nick
Telerik team
 answered on 19 Dec 2008
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?