Private
Sub
rgvTimeCards_CellFormatting(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.WinControls.UI.CellFormattingEventArgs)
Handles
rgvTimeCards.CellFormatting
Dim
amtIndex
As
Integer
= rgvTimeCards.Columns(
"BillableAmount"
).Index
Dim
hrsIndex
As
Integer
= rgvTimeCards.Columns(
"MarkUpHrs"
).Index
Dim
dollarsIndex
As
Integer
= rgvTimeCards.Columns(
"MarkUpDollars"
).Index
If
e.CellElement.ColumnIndex.Equals(hrsIndex)
Or
e.CellElement.ColumnIndex.Equals(dollarsIndex)
Then
If
rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value < 0
Then
e.CellElement.NumberOfColors = 2
e.CellElement.BackColor = Color.White
e.CellElement.BackColor2 = Color.Pink
e.CellElement.ForeColor = Color.Black
e.CellElement.DrawFill =
True
ElseIf
rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value > 0
Then
e.CellElement.NumberOfColors = 2
e.CellElement.BackColor = Color.White
e.CellElement.BackColor2 = Color.FromArgb(219, 230, 145)
e.CellElement.ForeColor = Color.Black
e.CellElement.DrawFill =
True
Else
e.CellElement.DrawFill =
False
End
If
ElseIf
e.CellElement.ColumnIndex.Equals(amtIndex)
Then
If
rgvTimeCards.Rows(e.CellElement.RowIndex).Cells(e.CellElement.ColumnIndex).Value < 0
Then
e.CellElement.NumberOfColors = 2
e.CellElement.BackColor = Color.White
e.CellElement.BackColor2 = Color.Pink
e.CellElement.ForeColor = Color.Black
e.CellElement.DrawFill =
True
Else
e.CellElement.DrawFill =
False
End
If
End
If
End
Sub
Dim
row
As
MyProjectDataSet.tblStaffRow<br> row =
CType
(
CType
(
Me
.ComboBoxStaff.SelectedItem, DataRowView).Row, MyProjectDataSet.tblStaffRow)
myArrayVariable.Add(row.StaffName)
private void comboboxSearchAddress_TextChanged(object sender, EventArgs e)
{
if (comboboxSearchAddress.Text.Length > 2)
{
List<
AddressPointType
>
liAddrs = AddressPoint.SearchAddress(comboboxSearchAddress.Text);
string s = comboboxSearchAddress.Text;
comboboxSearchAddress.Text = "";
comboboxSearchAddress.Items.Clear();
for (int i = 0; i < liAddrs.Count; i++)
{
comboboxSearchAddress.Items.Add(new RadComboBoxItem(liAddrs[i].Caption,liAddrs[i]));
}
comboboxSearchAddress.Text = s;
comboboxSearchAddress.Select(comboboxSearchAddress.Text.Length, 0);
}
}
Hello.. how are you..
i have the next scene.. i have a grid nest into the other grid i am using the tools to export of telerik.. its a example:
public void Export(String sFilepath, RadGridView grvExportExcel)
{
ExportToExcelML exporter = new ExportToExcelML(grvExportExcel);
exporter.SummariesExportOption = SummariesOption.ExportAll;
exporter.RunExport(sFilepath);
}
but its doesn't work .. when i run this function its make the file succesfully but only export the primary grid and the template not...
i need export all information of the grid... if somebody can help me.. i will pleasure.. for your help.
public void Export(String sFilepath, GridViewTemplate grvtExportExcel)
{
RadGridView rgvGrid = new RadGridView();
foreach (GridViewDataColumn c in grvtExportExcel.Columns)
{
rgvGrid.Columns.Add(c);
}
foreach (GridViewDataRowInfo d in grvtExportExcel.Rows)
{
rgvGrid.Rows.AddNew(d);
}
ExportToExcelML exporter = new ExportToExcelML(rgvGrid);
exporter.SummariesExportOption = SummariesOption.ExportAll;
exporter.RunExport(sFilepath);
}
}
but its doesn't work neither....
regards...
thanks for your help.