Telerik Forums
UI for WinForms Forum
6 answers
370 views
Hey all,
My apologies if this has already been posted - I swear I couldn't find it.

Using the Q3 2011 controlls (2011.3.11.1116):
I'm binding an anonymous type to the DataSource of a radDropDownList and getting an interesting (if unwanted) result.  After the binding the first value in the list is selected (which is good), however, the text instead shows the prototyping for the anonymous type.  I feel this is best to show in code, so here's an example.

If I'm doing something wrong please let me know.  Update() and Refresh() didn't seem to fix the issue.

Thanks,
-Al
private class TestClass
{
public int Id { get; set; }
public string NameVal { get; set; }
}
private void Form1_Load(object sender, EventArgs e)
{
var testItem1 = new TestClass() {Id = 1, NameVal = "One"};
var testItem2 = new TestClass() {Id = 2, NameVal = "Two"};
var test = new List<TestClass>() {testItem1, testItem2};
radDropDownList1.BeginUpdate();
radDropDownList1.DataSource = (from TestClass tc in test
select new {tc.Id, tc.NameVal});
radDropDownList1.DisplayMember = "NameVal";
radDropDownList1.ValueMember = "Id";
radDropDownList1.EndUpdate();
//radDropDownList1.Text = radDropDownList1.SelectedText; //This line is not equal to the following line...
radDropDownList1.Text = radDropDownList1.SelectedItem.Text; //This line is the fix, comment out to see bug
}
Peter
Telerik team
 answered on 27 Dec 2011
1 answer
128 views
Hi,

Whats the best method to Alternate column colors? Which method/event to use? And how? 
PS: I use ColumnGroups and ColumnGroupViewDefinition, and its those groups i want to alternate colors between.

Regards
Svein Thomas
Stefan
Telerik team
 answered on 26 Dec 2011
1 answer
185 views
Hello,

I use the treeview of version 2011 Q1.

I use the automatic databound method to populate the nodes. The source is a dataset with a child/parent structure.
I want to keep this way of processing because it's very fast. When I populate my treeview manually the process time very slow.

This is my code:

treeModules.DataMember = "treeNode";
  
treeModules.DisplayMember = "label";
  
treeModules.ValueMember = "id";
  
treeModules.ParentIDMember = "parent";
  
treeModules.DataSource = dsModuleXml;

Now I want to find a specific node by the tag property. This is not possible, because the function Find searches by name. Why is the name property empty when I use the automatic method?

Can anyone help me, thanks!
Stefan
Telerik team
 answered on 26 Dec 2011
1 answer
148 views
Hi,

It is possible to change Time Zone Label? By default it appears "Local" but i want to change to another string. In Scheduler picture attached, it is possible to see where is that "Local" label.
Ivan Todorov
Telerik team
 answered on 23 Dec 2011
1 answer
86 views
Hi,

I have the list of data on grid view with template fields.
I want to select the child rows if count is not equal to 0.
Whenever i populate the data, those child rows with count is 0 will be Hidden and IsSelected = false.
And those child rows with count is not 0 will be Visible and IsSelected = true.
My problem is the first child row to select is selected forever and unable to click.

private void raddgvHistory_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
      GridDetailViewCellElement cell = e.CellElement as GridDetailViewCellElement;
      if (cell != null)
      {
        if (cell.PageViewElement != null)
        {
          bool IsSelected = false;
 
          for (int iRow = 0; iRow < cell.PageViewElement.Items.Count; iRow++)
          {
            GridViewInfo viewInfo = cell.PageViewElement.Items[iRow].Tag as GridViewInfo;
            if (viewInfo.ChildRows.Count == 0)
            {
              cell.PageViewElement.Items[iRow].IsSelected = false;
              cell.PageViewElement.Items[iRow].Visibility = ElementVisibility.Hidden;
            }
            else
            {
              if (!IsSelected)
                IsSelected = cell.PageViewElement.Items[iRow].IsSelected = true;
 
              cell.PageViewElement.Items[iRow].Visibility = ElementVisibility.Visible;
            }
          }
        }
      }
 
    }

Correct me if there are some problem with my code.
Currently using Q2
Jack
Telerik team
 answered on 23 Dec 2011
3 answers
160 views
If my users can't print schedules, they will not use my product. Any advice would be helpful.

BTW - is there a list of the new features for 2011Q1?
Thanks

Later
Art
Ivan Todorov
Telerik team
 answered on 23 Dec 2011
1 answer
85 views
Custom control for telerik grid view in winforms

 In my Windows forms control library:

for MyGrid.cs (where MyGrid.cs is a component class)

public MyGrid : ` Telerik.WinControls.UI.RadGridView`

I build and i have MyGrid.dll & i have added that in my visual studio toolbox (also referenced that dll in my consuming winform app).

Consuming winform app:

1. In Form1.cs, i drag and drop that MyGrid  & i write this code:

>     MyGrid1.DataSource=ds.Table[0]; //Dataset

The grid doesn't get bound with records, whereas when i check ds `row count it has 150 records`. The grid however shows me green and white color (ie. alternating row color), but doesn't bind the data.

This is the code that consuming winform uses

       DataSet ds  = null;
       string connectionString = "Data Source=test;Initial Catalog=DBname;Integrated Security=True";
        string sql = " SELECT ID,FirstName from table1 ";
        SqlConnection connection = null;            

         connnection = new SqlConnection(connectionString);
         SqlDataAdapter dataadapter = new SqlDataAdapter(sql, connection);
         ds= new System.Data.DataSet();
         connection.Open();
         dataadapter.Fill(ds, "Table1");
         MyGrid1.DataSource = ds.Tables[0];

where MyGrid1 is the custom control that is being dragged and dropped from toolbox.

Custom control code:
                
  
            this.EnableAlternatingRowColor = true;
            this.TableElement.AlternatingRowColor  = System.Drawing.Color.Green;            
            this.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
            this.AutoGenerateColumns = true;

The telerik grid is not binding the data, however when i click on the cell, it shows me the value. Any thoughts?
Jack
Telerik team
 answered on 23 Dec 2011
3 answers
75 views
I'm trying to display multiple images in a subitem that would look something like this:

<text><image> <text><image>

Example:
5<image>; 1<image>; +14<image>

Is this do-able?

This post seems to have disappeared.
Ivan Todorov
Telerik team
 answered on 23 Dec 2011
1 answer
359 views
Hi,
I'm trying to set a transparent background to a RadLabel and I can't find a way to do so. I have an older project that uses 2010 Q2 controls and the transparent background there works fine.

My form has a gradient background, so any solid background color of the label will look awful. I'm sure there must be a way to make it work, otherwise the label is not useful in any case that the background is not plain solid.

Thanks for any help.
Sharon.
Ivan Petrov
Telerik team
 answered on 23 Dec 2011
2 answers
217 views
Hi,

I have built a VSTO project for Office using the RadTreeView and Windows7 theme from Q1 2010 SP2 (not the latest I know). I have inherited from the Telerik tree so I can implement some WinAPI interfaces but I am using the RadTree base class for all my UI and setting it's theme to Windows 7 via the properties pane in VS.
Up until today I've been deploying my project succesfully via msi to all sorts of Windows/Office configurations, everything installs and runs perfectly and the tree looks excellent and performs exactly as I want.
However I've just tried to install on Windows 7 x64 running Office 2010 x64. My project loads correctly as always but when the constructor for the tree is called I get the following error on InitializeComponent() -

System.ArgumentException: Specified resource does not exist in the provided assembly.
   at Telerik.WinControls.ThemeResolutionService.LoadPackageResource(ResourceParams resourceParams, Boolean throwOnError)

Exactly the same dll works fine against Office 2010 x32 on a Windows 7 x64 OS. And indeed on every Windows Vista/XP Office2010/2007 combination I've tried so far. Only the 64 bit Windows / 64 bit Office combination gives me this.

I can't debug it, if I debug it loads fine. If I load the same dll without debugging I always get the error. Could it be something to do with timing, the order the assemblies are loaded etc? Why is the theme not available only in these circumstances?

Any ideas would be hugely appreciated, seems very strange to me,

Thanks in advance for any replies...
Peter
Telerik team
 answered on 23 Dec 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
ProgressBar
CheckedDropDownList
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?