SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 440 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

White;
else
return (Color)headerRowBackColor;
}
set
{
ViewState["HeaderRowBackColor"] = value;
}
}
public Color HeaderRowForeColor
{
get
{
object headerRowForeColor = ViewState["HeaderRowForeColor"];
if (headerRowForeColor == null)
return Color.Black;
else
return (Color)headerRowForeColor;
}
set
{
ViewState["HeaderRowForeColor"] = value;
}
}
338 CHAPTER 7 ?–  SE RVER CONTROL DATA B INDING
protected override int CreateChildControls(IEnumerable dataSource,
bool dataBinding)
{
int count = 0;
if (dataSource != null)
{
table = new Table();
Controls.Add(table);
table.Attributes.Add("border", "1");
table.Attributes.Add("cellpadding", "2");
if (dataBinding)
{
EnhancedSpreadsheetRow row;
TableCell cellData;
IEnumerator e = dataSource.GetEnumerator();
e.MoveNext();
//Populate Header Row based on datasource schema for first data item
BuildHeaderRow(e.Current, dataBinding);
++count; //Increment for header row
do
{
object datarow = e.Current;
row = new EnhancedSpreadsheetRow(count, datarow, dataBinding);
this.Rows.Add(row);
if (datarow is DbDataRecord)
{
DbDataRecord temp = (DbDataRecord)datarow;
for (int i = 0; i < temp.FieldCount; ++i)
{
cellData = new TableCell();
row.Cells.Add(cellData);
cellData.


Pages:
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6