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

I am having trouble trying to figure out the binding and I am not sure if it is possible.

I have a base node with several child nodes and within those child nodes I need to add additional child nodes.

I have managed to bind the first level child nodes, but I cannot figure out how to add the additional child nodes.

Below is a sample.

Thank you,

Chom
IList<Project> project = new List<Project>();
IList<Topic> topic = new List<Topic>();
IList<Cloud> cloud = new List<Cloud>();
IList<Trend> trend = new List<Trend>();
IList<Schedule> schedule = new List<Schedule>();
 
cloud.Add(new Cloud { Name = "cloud1" });
cloud.Add(new Cloud { Name = "cloud2" });
 
trend.Add(new Trend { Name = "trend 1" });
trend.Add(new Trend { Name = "trend 2" });
 
schedule.Add(new Schedule { Name = "sched 1" });
schedule.Add(new Schedule { Name = "sched 2" });
 
topic.Add(new Topic { Name = "Clouds", CloudAssociation = cloud });
topic.Add(new Topic { Name = "Trends", TrendAssociation = trend });
topic.Add(new Topic { Name = "Schedules", ScheduleAssociation = schedule });
 
//Project.
project.Add(new Project { Name = "My Project", TopicAssociation = topic });
 
 
radTreeView1.DisplayMember = "Name\\Name\\Name";
radTreeView1.ParentMember = "Project\\TopicAssociation";
radTreeView1.ChildMember = "Project\\TopicAssociation\\CloudAssociation";
radTreeView1.DataSource = project;
Stefan
Telerik team
 answered on 03 Oct 2013
0 answers
226 views

I would want that area of ChartElement was fixed and I was able to move an ChartElement 

when using the zoom. How I can do it?

class Zoom
  {
      static double horizontalScale = 1;
      static double verticalScale = 1;
      public static double HorizontalScale
      {
          get
          {
              return horizontalScale;
          }
          set
          {
              horizontalScale = Math.Max(1, value);
          }
      }
      public static double VerticalScale
      {
          get
          {
              return verticalScale;
          }
          set
          {
              verticalScale = Math.Max(1, value);
          }
      }
  }
 
  private void radChartViewAnalysis_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
  {
      Zoom.HorizontalScale += e.Delta / 3000.0;
      Zoom.VerticalScale += e.Delta / 3000.0;
      radChartViewAnalysis.ChartElement.View.Zoom(Zoom.HorizontalScale, Zoom.VerticalScale);
  }
Roman
Top achievements
Rank 1
 asked on 03 Oct 2013
7 answers
160 views
I would like to view pdf documents in the RadPDFViewer that are composed of the form which is stored in an Oracle database as a blob and data which is also stored in oracle as xml text files. The forms were developed in Adobe LiveCycle. 
Thank you for your help.
Mick Mathews
Peter
Telerik team
 answered on 03 Oct 2013
1 answer
99 views
Does RadDropDownList support List of Interface as its Data Source?

I have a problem when using one, error is thrown when setting the display member of the drop down list.

I have an Interface, let's say
public interface IBase
{
 string Name { get; set; }
}

and this is used in 2 classes
public class First : IBase
{
  public string Name { getset; }
}
public class Second : IBase
{
  public string Name { get; set; }
}

Now when I try to populate a drop down list using these classes, I get the error of 
Property accessor 'Name' on object 'TestWinForm.Second' threw the following exception:'Object does not match target type.'

I tried to populate this by
private void button5_Click(object sender, EventArgs e)
        {
            IList<First> tests = new List<First>();
            First test = new First();
            test.Name = "Test1";
            tests.Add(test);
            First test2 = new First();
            test2.Name = "Test2";
            tests.Add(test2);
            IList<Second> tests2 = new List<Second>();
            Second test22 = new Second();
            test22.Name = "Test12";
            tests2.Add(test22);
            Second test222 = new Second();
            test222.Name = "Test22";
            tests2.Add(test222);
 
            IList<IBase> all = new List<IBase>();
 
            foreach(var item in tests)
            {
                all.Add(item);
            }
 
            foreach(var item in tests2)
            {
                all.Add(item);
            }
 
            radDropDownList1.DataSource = all;
            radDropDownList1.DisplayMember = "Name";
        }


Any idea why ?
George
Telerik team
 answered on 02 Oct 2013
3 answers
219 views


Hi, I have a GridView.

when I make a change in a cell of one row, and then I select to add a new row the event grid_RowValidating  its fier but when I do e.Row.IsModified I always get FALSE.

Only if I press in other row before I press to add a new row to the grid.

private void grid_RowValidating(object sender, RowValidatingEventArgs e)
       {
               if (e.Row == null) return;
               if (!e.Row.IsModified) return; 
        
       }



 the way to reproduce this is.

- Edit a cell from the gridView.
- Click to add new Row

e.Row.Index indicate that its checking the row I just edited where i change some value, so it should show me that there is a change.
I also tried adding the event RowChanged  but didnt work
private void grdPirteyMenahel_RowsChanged(object sender, GridViewCollectionChangedEventArgs e)
      {
          grid.EndEdit();
      }


Dimitar
Telerik team
 answered on 02 Oct 2013
6 answers
256 views
I have a gridview with two relations, and I really like how it puts the childrows of the two relations in the childview into two tabs. However, each of the tabs is named "table". How do I change the text on those tabs? I'm using VB .NET, version 4 or 4.5

Preferably, I'd like to do this outside of the viewcellformatting event. Is it possible to get to this through the gridview object itself

I can programmatically set IsExpanded, but how do I then tell it which tab to open at the same time?

Thanks!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Oct 2013
3 answers
92 views
For the AutoCompletebox is there an undo method? Typically pressing the ESC key will return the control to it's original state.

Thanks!
Dimitar
Telerik team
 answered on 02 Oct 2013
0 answers
129 views
I have tried binding to a multicolumn combobox with no success.  It works fine with checkboxes and textboxes.  Here is the code i'm using

DataTable dtAct = new DataTable();
BindingSource bsAct = new BindingSource();
 
//dtAct is populated by a query from my db.
 
bsAct.DataSource = dtAct;
bsAct.Position = 0;
 
 
/*
GetSupCat() returns
value text
1     Test1
2     Test2
3     Test3
*/
 
 
cbMainActSupCat.DataSource = GetSupCat(); //Procedure that returns a datatable with the data to populate the combobox
cbMainActSupCat.DisplayMember = "value";
cbMainActSupCat.ValueMember = "value";
cbMainActSupCat.DataBindings.Add(new Binding("SelectedItem", bsAct, "SupCat"));     
 
//SupCat comes from bindingsource from my original query

The combobox should show the value of "SupCat".  When I bind it to a textbox it shows me the number 2, but the combo still shows the first  item 1.

Thank you for any help you can give me.  This is an important part of my application.
Jerry
Top achievements
Rank 1
 asked on 02 Oct 2013
3 answers
864 views
Hello,

I am using Radgridview and i have N number of Columns. While doing Add/Edit a row, on a particular column user should allow only numbers(0 to 10) to type/fill. The user can also copy paste on this cell/column in that case it should only allow to paste numbers.
Can any one help me on this?

Thanks & Regards
Rams
Dimitar
Telerik team
 answered on 02 Oct 2013
3 answers
119 views
I have a problem with getting CurrentRow Index.

private void myRadGridView_DefaultValuesNeeded(object sender, Telerik.WinControls.UI.GridViewRowEventArgs e)
{
      int index = e.Row.Index;
      int index2 = this.myRadGridView.CurrentRow.Index;
}

Both ways give me one result: -1
My GridView is bound with dataSet.
How can I get CurrentRow Index in DefalutValuesNeeded event?

Help for thanks.

Kuba
Szymon
Top achievements
Rank 1
 answered on 01 Oct 2013
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?