Telerik Forums
UI for WinForms Forum
1 answer
122 views
how can i create hirarchical grid using Generic list. Can anybody provide example for it.
Nikolay
Telerik team
 answered on 09 Oct 2012
1 answer
127 views
sorry problem was with old references.
Nikolay
Telerik team
 answered on 09 Oct 2012
1 answer
123 views
I've created a simple RadGridView with 2 columns and turned off displaying grid lines and I get the following error:

Object reference not set to an instance of an object.
   at Telerik.WinControls.UI.GridRowElement.UpdateSelectedState()

 
Seems that setting display.HideSelection=true causes BestFit to raise the error.

Here's the code that reproduces the problem:

private void GenerateConfigurationSummary(RadGridView display)
{
    const string colValue = "value";
    const string colHeader = "header";
    
    display.HideSelection = true;
    display.Rows.Clear();
    display.Columns.Clear();
    display.Columns.Add(colHeader);
    display.Columns.Add(colValue);
    display.ReadOnly = true;
    display.ShowColumnHeaders = false;
    display.ShowRowHeaderColumn = false;
    display.TableElement.DrawBorder = false;
 
    display.CellFormatting += (s, e) =>
    {
        if (e.Column.Name == colHeader)
            e.CellElement.Font = new System.Drawing.Font(e.CellElement.Font, System.Drawing.FontStyle.Bold); 
 
        e.CellElement.DrawBorder = false; 
    };
 
    try
    {
        display.Rows.Add("Test Row 1", "Test Value 1");
        display.Rows.Add("Test Row 2", "Test Value  larger line goes here");
        display.Rows.Add("Test Row 3", "Test Value 1");
 
        foreach (var col in display.Columns)
            col.BestFit();
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.WriteLine("Error Formatting Display: " + ex.ToString());
    }
}

 

 

 

 

Stefan
Telerik team
 answered on 09 Oct 2012
7 answers
497 views
Hi,

I need to place a checkbox in a header of a gridviewcheckboxcolumn of radgridview. for obvious reason. how can i do it in rad gridview?

Thanks
Trinh
Top achievements
Rank 1
 answered on 09 Oct 2012
3 answers
796 views
I installed the ASP.NET AJAX, Windows Forms, Reporting and OpenAccess ORM on my laptop that already had Visual Studio 2010 installed.  I recently installed Visual Studio 2012.  When I launch VS2010, I see Telerik project types as an option for getting started, but I don't see those in VS2012.  I assume that I need to add the VS extensions, but how?  When I look in C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q2 2012 SP1\VSExtensions, I have a directory for VS2008 and for VS2012. 

How do I update VS2012 to also have these project types and to update the toolbox accordingly?

Thank you!
Chavdar Dimitrov
Telerik team
 answered on 09 Oct 2012
2 answers
213 views
Hi.
I encounter with problem for RadDropDownList, with DropDownStyle = DropDownList.
I'm trying to select first element by typing first letter of the element in active control, but it don't work. It works for other elements in list, except first.

Is there any solution for this problem?
Michael
Top achievements
Rank 1
 answered on 09 Oct 2012
1 answer
163 views

I want to drag an ui element from another part of the screen to only the selected row of a gridview. The workflow is that use selects one row on the gridview (row multiselection is disabled) and then drags something on that row.
So only if the mouse cursor is on top of the selected row the cursor should change to DragDropEffects.Link. Any other row, column header, filter header, grouping are etc. should show DragDropEffects.None. I also want to change the row border od the selected row ro green color if possible to indicate that this drop is allowed.

Then I have some business logic to with the AddressBase object in the gridviewinfo.tag of the selected row and the data in the DragEventArgs. So far I have managed to do this in the grid's DragOver event handler. But how do I check that the element at mouse location is within the border of the selected row.

private void PersonMailingGridOnDragOver(object sender, DragEventArgs e)
{
 Point location = PersonMailingGrid.PointToClient(new Point(e.X, e.Y));

 GridDataCellElement element = PersonMailingGrid.ElementTree.GetElementAtPoint(location) as GridDataCellElement;
 
 // check that the element is inside the selected row
 
 if (element != null && !(element is GridFilterCheckBoxCellElement))
 {
  AddressEventArgs data = (AddressEventArgs)e.Data.GetData(typeof(AddressEventArgs));
  AddressBase dragAddress = data.Address;
  AddressBase rowAddress = element.GridViewElement.CurrentRow.Tag as AddressBase;

  _lastDragElement = element.GridViewElement;
  _lastDragElementBackColor = element.RowElement.BackColor;

  if (rowAddress != null && rowAddress.AddressContactType == dragAddress.AddressContactType)
  {
   e.Effect = DragDropEffects.Link;
   element.RowElement.BackColor = _dragStateBorderColourAllowed;
  }
  else
  {
   e.Effect = DragDropEffects.None;
   element.RowElement.BackColor = _dragStateBorderColourNotAllowed;
  }
 }
}

 

 

Svett
Telerik team
 answered on 08 Oct 2012
1 answer
110 views
Hello,

This week we migrated our software from Visual Studio 2008 to 2010. We have a treeview (few places) and it contains an imagelist. Which worked perfectly in VS2008. But now in VS2010 the images are gone and we go back to the basic view with the + and - before a node.

We did not change anything but our own images are not shown anymore. We did not upgrade our Telerik DLL or anything. Just migrated to 2010.

We hope anyone knows a solution.

Thanks,

Niels den Otter
Jack
Telerik team
 answered on 08 Oct 2012
1 answer
329 views
Q1 2012
VS 2010

The following snippet does not run.

private void HightlightText(string textToHighlight)
{
    DocumentTextSearch search = new DocumentTextSearch(this.radRichTextBox.Document);
    foreach (var textRange in search.FindAll(textToHighlight))
    {
        this.radRichTextBox.Document.Selection.AddSelectionStart(textRange.StartPosition);
        this.radRichTextBox.Document.Selection.AddSelectionStart(textRange.EndPosition);
        this.radRichTextBox.ChangeTextHighlightColor(Color.Red);
    }
}


How can I highlight with red color all the occurrences of the text?

Tommaso
Svett
Telerik team
 answered on 08 Oct 2012
1 answer
118 views
I am trying to install my vs2010 windows program on a user's computer.  I have enabled the app to copy over the bin files but I still get a dependency error during installation.  The app also complains about versions.  When I try to install it on a user's computer, I get the following installer error:

http://screencast.com/t/1MEpc4Tr8PQ9

Please assist.
Stefan
Telerik team
 answered on 08 Oct 2012
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
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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?