or
foreach (GridViewColumn col in grid.Columns) { arr[0, i] = col.HeaderText; i++; } //Contents long currRow = 0; foreach (GridViewRowInfo row in grid.Rows) { int currCol=0; foreach (GridViewColumn col in grid.Columns) { if(row.Cells[currCol].Value != null ) { arr[currRow + 1, currCol] = row.Cells[currCol].Value.ToString(); } else { arr[currRow + 1, currCol] =""; } currCol ++; } currRow ++; } rng.Value2 = arr;
Imports Telerik.WinControls.UI Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim rpbge As RadPanelBarGroupElement For i As Integer = 0 To 10 rpbge = New RadPanelBarGroupElement rpbge.Caption = "Group" & i rpbge.EnableHostControlMode = True RadPanelBar1.Items.Add(rpbge) Next Dim rlc As New RadListControl rlc.Height = 2 rlc.Width = rpbge.ContentPanel.ClientSize.Width rlc.Anchor = AnchorStyles.Left Or AnchorStyles.Right Or AnchorStyles.Top rpbge.ContentPanel.Controls.Add(rlc) rpbge.Expanded = True End Sub End Class 
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Telerik.WinControls;using Telerik.WinControls.UI;public partial class RadForm1 : RadForm{ public RadForm1() { InitializeComponent(); radTextBox1.Text = "Some random Text!"; radListControl1.AutoSizeItems = true; radTextBox1.Font = new Font("Times New Roman", 10, FontStyle.Bold); radTextBox1.TextBoxElement.ForeColor = Color.Red; radListControl1.SelectionMode = SelectionMode.One; } List<int> ids = new List<int>(); private int GetNewId() { int returnValue = 0; do { returnValue = new Random().Next(int.MaxValue); } while (ids.IndexOf(returnValue) >= 0); ids.Add(returnValue); return returnValue; } private void radButton1_Click(object sender, EventArgs e) { RadListDataItem itemHeader = new RadListDataItem(string.Format("<html><b>{0}</b> ({1})</html>", "Some User", DateTime.Now), GetNewId()); radListControl1.Items.Add(itemHeader); RadListDataItem itemText = new RadListDataItem(radTextBox1.Text, GetNewId()); itemText.TextWrap = true; itemText.Font = radTextBox1.Font; itemText.ForeColor = radTextBox1.TextBoxElement.ForeColor; radListControl1.Items.Add(itemText); RadListDataItem itemFooter = new RadListDataItem(" ", GetNewId()); radListControl1.Items.Add(itemFooter); radListControl1.SelectedItem = itemFooter; radTextBox2.Text = radListControl1.Items.Count.ToString(); } private void radButton2_Click(object sender, EventArgs e) { for (int i = 0; i < 20; i++) { radButton1_Click(null, null); } }}partial class RadForm1{ /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.radListControl1 = new Telerik.WinControls.UI.RadListControl(); this.radTextBox1 = new Telerik.WinControls.UI.RadTextBox(); this.radButton1 = new Telerik.WinControls.UI.RadButton(); this.radButton2 = new Telerik.WinControls.UI.RadButton(); this.radTextBox2 = new Telerik.WinControls.UI.RadTextBox(); this.label1 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.radListControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radButton1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radButton2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); this.SuspendLayout(); // // radListControl1 // this.radListControl1.CaseSensitiveSort = true; this.radListControl1.ItemHeight = 18; this.radListControl1.Location = new System.Drawing.Point(12, 12); this.radListControl1.Name = "radListControl1"; this.radListControl1.Size = new System.Drawing.Size(274, 229); this.radListControl1.TabIndex = 0; this.radListControl1.Text = "radListControl1"; // // radTextBox1 // this.radTextBox1.Location = new System.Drawing.Point(12, 247); this.radTextBox1.Name = "radTextBox1"; this.radTextBox1.Size = new System.Drawing.Size(192, 20); this.radTextBox1.TabIndex = 1; this.radTextBox1.TabStop = false; this.radTextBox1.Text = "radTextBox1"; // // radButton1 // this.radButton1.Location = new System.Drawing.Point(211, 247); this.radButton1.Name = "radButton1"; this.radButton1.Size = new System.Drawing.Size(33, 24); this.radButton1.TabIndex = 2; this.radButton1.Text = "1"; this.radButton1.Click += new System.EventHandler(this.radButton1_Click); // // radButton2 // this.radButton2.Location = new System.Drawing.Point(250, 247); this.radButton2.Name = "radButton2"; this.radButton2.Size = new System.Drawing.Size(36, 24); this.radButton2.TabIndex = 3; this.radButton2.Text = "20"; this.radButton2.Click += new System.EventHandler(this.radButton2_Click); // // radTextBox2 // this.radTextBox2.Location = new System.Drawing.Point(211, 277); this.radTextBox2.Name = "radTextBox2"; this.radTextBox2.Size = new System.Drawing.Size(75, 20); this.radTextBox2.TabIndex = 4; this.radTextBox2.TabStop = false; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(153, 277); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(52, 13); this.label1.TabIndex = 5; this.label1.Text = "Counter:"; // // RadForm1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(298, 303); this.Controls.Add(this.label1); this.Controls.Add(this.radTextBox2); this.Controls.Add(this.radButton2); this.Controls.Add(this.radButton1); this.Controls.Add(this.radTextBox1); this.Controls.Add(this.radListControl1); this.Name = "RadForm1"; // // // this.RootElement.ApplyShapeToControl = true; this.Text = "RadForm1"; this.ThemeName = "ControlDefault"; ((System.ComponentModel.ISupportInitialize)(this.radListControl1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radButton1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radButton2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private Telerik.WinControls.UI.RadListControl radListControl1; private Telerik.WinControls.UI.RadTextBox radTextBox1; private Telerik.WinControls.UI.RadButton radButton1; private Telerik.WinControls.UI.RadButton radButton2; private Telerik.WinControls.UI.RadTextBox radTextBox2; private System.Windows.Forms.Label label1;}radGridView1.DataSource = BusinessObject.getAll(); //Returns IQueryable //Setting filter descriptorsFilterDescriptor filter = new FilterDescriptor(); filter.Operator = FilterOperator.IsEqualTo; filter.PropertyName = "Username"t; filter.Value = "Bob"; filter.IsFilterEditor = true; this.radGridView1.MasterTemplate.EnableCustomFiltering = true; this.radGridView1.MasterTemplate.EnableFiltering = true; this.radGridView1.FilterDescriptors.Clear(); this.radGridView1.FilterDescriptors.Add(filter); radGridView1.ShowFilteringRow = true;
Hi,
Is it possible to control the data that appear in the appointment box?
As you see in the picture the time is appearing, if I want to show something else how can I do that?
Thanks in advance
