public partial class RadGridViewEx : RadGridView |
{ |
public RadGridViewEx():base() |
{ |
InitializeComponent(); |
} |
protected override void CreateChildItems(RadElement parent) |
{ |
base.CreateChildItems(parent); |
GridHeaderElement header = ((Telerik.WinControls.UI.GridTableElement)(this.GridElement)).HeaderElement; |
RadComboBoxElement cb = new RadComboBoxElement(); |
RadItem item = new RadItem(); |
item.Text = "A"; |
cb.Items.Add(item); |
item = new RadItem(); |
item.Text = "B"; |
cb.Items.Add(item); |
item = new RadItem(); |
item.Text = "C"; |
cb.Items.Add(item); |
item = new RadItem(); |
item.Text = "D"; |
cb.Items.Add(item); |
//cb.Location = new Point(0, 25); |
cb.Size = new Size(100, 25); |
cb.DropDownHeight = 300; |
cb.SelectedIndexChanged += new EventHandler(cb_SelectedIndexChanged); |
header.GroupPanel.Children.Add(cb); |
} |
void cb_SelectedIndexChanged(object sender, EventArgs e) |
{ |
RadComboBoxElement cb = sender as RadComboBoxElement; |
MessageBox.Show(((RadItem)cb.SelectedItem).Text); |
} |
} |
What would be the appropriate approach for displaying an image in column 1 with the value of column 2.
For example, if column 2 is a status column and when the status is "GOOD" I want image1 to be displayed but when its "BAD" I want image2 to be displayed. How would I handle this? What approach would have the best performance when there are a large number of rows? We have one grid that contains over 100,000 rows of data.
Thanks for the help.
Bryan
Dim i As Integer
For i = 0 To Me.TblUsersRadGridView.ColumnCount - 1
If Me.TblUsersRadGridView.Columns(i).AllowGroup Then
Me.TblUsersRadGridView.MasterGridViewInfo.TableHeaderRow.Cells(i).CellElement.Font.Italic = True
End If
Next
WITH BOMCTE |
AS |
( |
SELECT * |
FROM MBM |
WHERE BPROD = @PN |
UNION ALL |
SELECT MBM.* |
FROM MBM |
JOIN BOMCTE |
ON MBM.BPROD = BOMCTE.BCHLD and MBM.BMBOMM = BOMCTE.BMBOMM |
) |
SELECT DISTINCT cast(BCHLD as varchar(100))as ChildID, cast(BPROD as varchar(100))as ParentID, BSEQ as Sequence, IABC as 'ABC Code', ICOND as 'Condition Code', IDESC, IDSCE as '2nd Desc', ICITYP as Type, ICLAS as Team FROM BOMCTE |
INNER JOIN IIM on BCHLD = IPROD |
INNER JOIN CIC on BCHLD = ICPROD |
UNION ALL |
SELECT DISTINCT cast(ICPROD as varchar(100))as ChildID, cast(NULL as varchar(100))as ParentID, 0 as Sequence, IABC as 'ABC Code', ICOND as 'Condition Code', IDESC, IDSCE as '2nd Desc', ICITYP as Type, ICLAS as Team |
FROM CIC |
INNER JOIN IIM on ICPROD = IPROD |
WHERE ICFAC = @FAC and ICPROD = @PN Order by Sequence |
Private
Sub SetConditions()
Dim obj As New ConditionalFormattingObject("MyCondition", ConditionTypes.Equal, System.DBNull.Value.ToString, "", True)
obj.CellForeColor = Color.Red
obj.RowBackColor = Color.Yellow
Me.RadGridView_SessionData.Columns("Assignment").ConditionalFormattingObjectList.Add(obj)
End Sub
Any ideas!
SchedulerDayView dayView = radScheduler1.GetDayView(); |
dayView.ShowRuler = false; |
dayView.ShowAllDayArea = false; |
dayView.DayCount = 1; |
dayView.AppointmentTitleFormat = "{2}"; |
dayView.WorkTime = new TimeInterval(TimeSpan.Zero, TimeSpan.Zero); |
Buttons added to the Ribbon bar in design time and dynamically seems to have the different behavior on mouse hoover. Meanwhile when I move mouse over buttons added in design time they are highlighted, dynamically added button are not highlighted. How can I set up this behavior thru program code?
Here is my method for adding buttons to the button group:
private void AddItemToButtonGroup(RadRibbonBarGroup group, String ItemName, String ItemText, String ItemDescription)
{
RadButtonElement item = new RadButtonElement();
item.DisplayStyle = DisplayStyle.ImageAndText;
item.TextImageRelation = TextImageRelation.ImageBeforeText;
item.ImageAlignment = ContentAlignment.MiddleCenter;
item.Name = ItemName;
item.Text = ItemText;
item.ShowBorder = true;
item.TextWrap = true;
item.Margin = new Padding(1);
item.TextAlignment = ContentAlignment.MiddleCenter;
item.ToolTipText = ItemDescription;
item.MaxSize = new Size(80, 80);
item.Click += new EventHandler(Item_Click);
group.Items.Add(item);
}