radGridView1.DataSource = db.AppUsage(1, new DateTime(2011, 2, 10), new DateTime(2011, 5, 11));void radGridView1_RowSourceNeeded(object sender, GridViewRowSourceNeededEventArgs e){ GridViewRowInfo rowInfo = e.ParentRow; String packageId = rowInfo.Cells["PackageId"].Value.ToString(); String parentPackageId = rowInfo.Cells["ParentPackageId"].Value.ToString(); WorkspaceMiQEntities db = new WorkspaceMiQEntities(); foreach (var u in db.Usage(1, new DateTime(2011, 2, 10), new DateTime(2011, 5, 11), null, Int32.Parse(packageId), null, Int32.Parse(parentPackageId))) { GridViewRowInfo row = e.Template.Rows.NewRow(); row.Cells["StartDateTime"].Value = u.StartDateTime; row.Cells["EndDateTime"].Value = u.EndDateTime; row.Cells["UserName"].Value = u.UserName; row.Cells["DomainName"].Value = u.DomainName; row.Cells["DeviceName"].Value = u.DeviceName; e.SourceCollection.Add(row); } db.Dispose(); }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 SubDim 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.