Hello,
I dont know how to solve this:
I have a RadGridView grouped by program code and I know that each group has always 2 rows. And I want in the GroupHeader to be displayed some data from not "group by" collumns from the second of the rows in that group. Is it possible?
//Don't do anything if there is no column info, or the cel is a Header element of the data column.
if ((e.CellElement.ColumnInfo is GridViewDataColumn) && (e.CellElement.RowElement is GridTableHeaderRowElement) == false)
{
GridViewDataColumn columnInfo = (GridViewDataColumn)e.CellElement.ColumnInfo;
if (columnInfo.FieldName == "SurfaceConsumedTotalInPct") //For all the cells that match the databound property's name.
{
e.CellElement.Children.Clear();
RadProgressBarElement progressBar = new RadProgressBarElement();
e.CellElement.Children.Add(progressBar);
double intValue = (double)e.CellElement.RowInfo.Cells["columnSurfaceConsumedTotalInPct"].Value;
progressBar.Value1 = (
int)Math.Round(intValue, 0);
if (intValue > 0)
{
//only show the % textually in the progressbar if there is a value greater than zero,
progressBar.Text = intValue.ToString() +
"%";
}
else
{
progressBar.Text =
string.Empty;
}
// apply theme to the progress bar
progressBar.SeparatorWidth = 0;
//ApplyThemeToElement(progressBar, this.radGridViewWarehouseOccupations.ThemeName);
ApplyThemeToElement(progressBar,
null);
}
}
| RadTextBoxElement textbox = new RadTextBoxElement(); |
| textbox.Alignment = ContentAlignment.MiddleCenter; |
| textbox.KeyPress += new KeyPressEventHandler(textbox_KeyPress); |
| textbox.TextChanged += new EventHandler(textbox_TextChanged); |
| e.CellElement.Children.Add(textbox); |
Hi,
I have to added a custom elements (RadTextBoxElement) to grid cells on the CellFormatting event at runtime.
|
RadTextBoxElement textbox = new RadTextBoxElement(); |
|
textbox.Alignment = ContentAlignment.MiddleCenter; |
|
textbox.KeyPress += new KeyPressEventHandler(textbox_KeyPress); |
|
textbox.TextChanged += new EventHandler(textbox_TextChanged); |
|
e.CellElement.Children.Add(textbox); |
I would like to limit the value of textbox not over 99 but i can't set the max length property of the RadTextBoxElement.
Can you help me for solve this problem ?