Telerik Forums
UI for WinForms Forum
1 answer
149 views
To summarize what I am attempting to do, I am attempting to export data items from a RadListView (databound) to Excel using a RadGridview and RadGridViewExcelExporter.

This is actually a 2-part issue: 
The first issue involves populating with data the RadGridView object that is passed to the RadGridViewExcelExporter (see below).

void Export_to_Excel(String myExcelFile)
{
RadGridView myGridView = new RadGridView();
myGridView.DataSource = myDataSet.joberrors;
RadGridViewExcelExporter exporter = new RadGridViewExcelExporter();
exporter.Export(myGridView, myExcelFile, "Sheet1");
exporter = null;
myGridView = null;
}

myDataSet.joberrors is the datasource of my RadListView and contains 2 rows and 14 columns.  Using the above code, myGridView contains 0 rows and 0 columns even after the datasource is set.

To solve this I used     

    
myGridView.LoadFrom(myDataSet.joberrors.CreateDataReader()); 


now myGridView is successfully populated with data, but the second problem now rears its head...

After exporting the data to Excel using the RadGridViewExcelExporter , the exported worksheet only contains one column - the primary key of myDataSet.joberrors?.

Any ideas what I am doing wrong?  Is there an easier way to do this?

Thanks
Emanuel Varga
Top achievements
Rank 1
 answered on 16 Sep 2011
1 answer
144 views
Hi, 

I want to use AutoGenerateHierarchy, but I am having a hard time, telling the grid to not show certain columns. I added child templates with the name in the properties of the object being displayed, and marking these columns as not visible, but these templates just get ignored. 

How can I control what which columns get displayed when using AutoGenerateHierarchy ? 

thanks. 
Emanuel Varga
Top achievements
Rank 1
 answered on 16 Sep 2011
7 answers
389 views
We have a requirement to check a single row in the radgridview.
What should be the approach for this requirement using RadGridView, we need to use a checkbox column or is there any radio button column.
Please help me regarding the above.

Martin Vasilev
Telerik team
 answered on 15 Sep 2011
5 answers
97 views
Hello
When add

 

  dg.Relations.AddSelfReference(dg.MasterTemplate,"ID", "IDPARENT");

The event bnds_PositionChanged works only when go with level on another.

А within

the one level does not work.

 

Operation of the removing does not work too.

 

Thanks!


Julian Benkov
Telerik team
 answered on 15 Sep 2011
1 answer
178 views
I'm using RadControls for WinForms  Q2 2011 (version 2011.2.11.831)  and would like to highlight the Checkbox when it has focus to make it easier for my users to find the focused field.  I have code working with the Enter/Leave events for RadButtons and RadDropDownLists but am unable to get it working for the RadCheckBox.  I've tried using the BackColor/ForeColor properties of the ButtonElement.ButtonFillElement object but to no avail.

Here is my class code for the RadButton:
this.Enter += new EventHandler(BaseButton_Enter);
this.Leave += new EventHandler(BaseButton_Leave);
  
void BaseButton_Enter(object sender, EventArgs e)
  {
      this.ButtonElement.ButtonFillElement.BackColor = Color.Blue;
      this.ButtonElement.ForeColor = Color.White;
      this.ButtonElement.ButtonFillElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
  }
void BaseButton_Leave(object sender, EventArgs e)
  {
      this.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
      this.ButtonElement.ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local);
      this.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local);
  }

How can I do a similar effect for the RadCheckBox.

Secondly, I'd actually like to not hard code the colors, but to use the Selected Text Color of the TextBox (I'm assuming this comes from the Theme in use).  How do I access the information ?

Thanks,
Chet
Ivan Petrov
Telerik team
 answered on 15 Sep 2011
1 answer
109 views
I've got a gridview with a combobox column. When I add a new row, I can chose a value from my combobox but how can I set the value of an other column depending on the value that is chosen from the combobox when I insert the new row to the gridview.



Emanuel Varga
Top achievements
Rank 1
 answered on 15 Sep 2011
4 answers
133 views

I have a RadDropDownList in a gridview, the Value Changed Event is raised only when I increase/ Decrease the value with the arrows and not when key pressed.

I partially resolved the problem by adding the following code to the Value Changed Event:

     GridSpinEditor gseditor = sender as GridSpinEditor;

                    if (gseditor != null)

                    {

                        this.CurrentCell.Value = gseditor.Value;

                    }

When I press the backspace key the event is raised except if it the last digit.
Any solution?

Thanks,
Dror

Martin Vasilev
Telerik team
 answered on 15 Sep 2011
2 answers
223 views

Hello,

In a gridview, I am using a GridViewDecimalColumn to display numeric data.

The problem is that I would like to be able to use the two arrows key (Up and Down) to scroll on my GridView, and not have my data being increased or decreased when using them. Is there a way to disable the increasing and decreasing of data when using these keys ?

If not, is there a possibility to use another column type (GridViewTextBoxColumn for example) and then, how can I manage it so only numeric values can be typed into it ?

Thank you for your help.
Bruno
Top achievements
Rank 1
 answered on 15 Sep 2011
2 answers
218 views
is there a way to batch update cell value of a gridview.

I have a situation where i have to loop thru each row and then update one cell value, as shown below. But it becomes really slow when i have large number of records on the grid, so is there any batch update that can be applied. My interface is with a textbox field above the grid and when the user enter text and press apply it has to apply that text to all records on the grid (it could be 100 - 10000 reocords on the grid depending one the search)
foreach (GridViewRowInfo row in radGV_.Rows)
       {
           row.Cells["BName"].Value = txtBName.Text;
       }

Alexander
Telerik team
 answered on 15 Sep 2011
3 answers
170 views
Hello!

I'm using the RadControls 2011Q2 and I want to disable the ability to resize the Form with the RadStatusStrip. I have already disabled the SizingGrip, though I can resize the Form.

Is there a way using the StatusStrip and the window can only be resized as normal Form-behavior?

Kind regards
Juergen
Stefan
Telerik team
 answered on 15 Sep 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
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?