Telerik Forums
UI for WinForms Forum
3 answers
181 views
I have the following:
 

GridViewLookUpColumn 

 

cs = 
    (
GridViewLookUpColumn) grdDocActivities.Columns.FindByUniqueName("colSubDisc");

Question:

How can I get the current selected value of this control?

I see there's a "GetLookupValue()" method, but I can't find details on how to use it.

Advice or tips?  Thanks!

 

 

 

 

 

 

 

 

 

 

Martin Vasilev
Telerik team
 answered on 23 Dec 2008
3 answers
122 views
Hi

I am trying to simulate the ordering of "details view" on windows explorer (Vista). That is, all the folders are grouped together.

I have the name, date, type, size columns and a "isfile" which is not shown, although one could use the fact that size is string.empty. Anyhow, I have been trying with SortExpressions but to no avail. Take a look at my tests.

        private void radGridView_SortChanged(object sender, GridViewCollectionChangedEventArgs e)
        {
            if (e.GridViewTemplate.SortExpressions.Count > 0) // clear does trigger sortchanged
            {
                if (e.GridViewTemplate.SortExpressions.IndexOf("IsFile") == -1) // already added?
                {
                    e.GridViewTemplate.SortExpressions.Insert(0, new GridSortField("IsFile", e.GridViewTemplate.SortExpressions[0].SortOrder)); // force it to be the most important expression
                }
            }
        }

Any ideas?

Thanks
-jorge
VS2005, 2008Q3 1204
Julian Benkov
Telerik team
 answered on 22 Dec 2008
12 answers
1.4K+ views
Hi
In the Grid I have a column that is 'Actions' columns. Meaning that the user is clicking on the field in this column, that start some operation on the relevant row.
The column has a picture icon of 'play' and 'stop'.
I didn't find the way to put the icon on the 'Command button' for the grid.
So, i used a simple column and put the icon and when the user is pressing on this column, i catch the event: grid_CellClick.

The problem is that the user don't see that the 'button' was pressed.

1. Is there a way to put an icon or image on the command button for the grid?
2. Is there  a way to simulate the button pressing on the column, even when it is not a command button?

Thanks Yael Kline
Nick
Telerik team
 answered on 22 Dec 2008
5 answers
136 views
Hello,

I am using the Outlook 2007 style on RadPanelBar. It is missing one thing from Outlook though:

When you have selected a RadPanelBarGroupElement, it is not highlighted in color. The color disappears when you remove the mouse cursor.

Is it somehow possible to resemble this behaviour?

Martin Vasilev
Telerik team
 answered on 22 Dec 2008
1 answer
176 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
133 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
83 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
86 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
380 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.ObjectByVal 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
109 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
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
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?