Hi ,
I am using Infragistics v8.2, my problem is when i am trying to Export ultrawebgrid to excel only my first Band data is exporting but under my grid i had three bands.
Ex:
Hospital IsActive Curentstatus ----- First Band
+Hospital1 true valid
Doctor Speciality IsActive -----------------------Second Band
+ John cardiology true
Patientname Age Sex---------------------------------------Third Band
Patient1 30 M
Patient2 35 F
+ Shaym Ortho false
Patientname Age Sex
Patient3 25 F
Patient4 27 M
+Hospital2 false Invalid
Doctor Speciality IsActive
+ David cardiology true
Patient5 30 M
Patient6 35 F
+ Lee Ortho false
Patient7 25 F
Patient8 27 M
When grid will load only first band(Hospitals) will come with (+) Mark, when user will expand this Doctors(Second band) and when user will expand this Patients(Third band) will come. like in above manner.
But the Problem when i am trying to Export this Ultrawebgrid to Excel i am getting only my first Band (Hospitals) i am not getting remaining bands(Doctors,Patients).
Export Events:
{
int iRdex = e.CurrentRowIndex;
// Obtain reference to CellFormat object for current cell.
cfCellFmt = e.CurrentWorksheet.Rows[iRdex].Cells[iCdex].CellFormat;
// Set format property for the font color to red.
// Apply the formatting, this step minimizes the number of
// Worksheet Font objects that need to be instantiated.
//e.CurrentWorksheet.DisplayOptions.OrderColumnsRightToLef;
}
Ultraexcelexporter.Export(Ultraall).Precision = 0.00;
Design declarions :
OnSummaryCellExporting="Ultraexcelexporter_SummaryCellExporting" OnSummaryCellExported="Ultraexcelexporter_SummaryCellExported"
OnCellExporting="Ultraexcelexporter_CellExporting" TypeCoercion="Default"
ExportMode="Download">
</igtblexp:UltraWebGridExcelExporter>
Please help me ......
Thanks, regards
Sivaprasad
There are too many variables for me to determine why data in your second and third bands are not being updated in your database. The most important first question is to determine what you're using as the grid's DataSource, since this will determine what you need to do to make database updates happen.
I suggest you submit a support request so that a Developer Support Engineer can assist you in more detail. So that we can ensure we're looking at the same code you are, I also suggest that you include a sample project that we can run and debug demonstrating not being able to update data on the second or third band of a hierarchical grid. I suggest you use the Northwind database, either in SQL Server or an Access file, since we have this database available; you can also provide your own Access database if it's not overly large.
Hi Vinve,
I had a grid which has three bands and i want to edit rows at second band and this edited rows i have to update in database
Doctor Speciality IsActive Edit -----------------------Second Band (This row I want to Edit and Update in Database)
+ John cardiology true Edit
Patientname Age Sex Edit ---------------------------------------Third Band (This row I want to Edit and Update in Database)
Patient1 30 M Edit
Patient2 35 F Edit
+ Shaym Ortho false Edit
Patientname Age Sex Edit
Patient3 25 F Edit
Patient4 27 M Edit
Doctor Speciality IsActive Edit
+ David cardiology true Edit
Patient5 30 M Edit
Patient6 35 F Edit
+ Lee Ortho false Edit
Patient7 25 F Edit
Patient8 27 M Edit
Thanks , Regards
I'm glad that the suggestion helped.
I don't entirely understand what you mean by your follow-up questions.
Hi Vince,
Thank you, Now i had give LoadOnDemand = "Notset" it is working good and one more thing i want to know
How to Edit Rows at Second band and How to update edited row in Database
If you have hierarchical data in WebGrid that you export to Excel, then it should export that hierarchical data to the Excel worksheet.
There is one setting I can think about that might affect this. If you're using Automatic, Manual, or Xml for your DisplayLayout.LoadOnDemand setting on your grid, set it to None and call DataBind() on the grid just before calling Export() on the WebGridExcelExporter. This is because all of these settings will restrict what rows of data are actually added as rows to WebGrid, and the Excel exporter will only export the rows that exist in the grid.
If you already have LoadOnDemand set to None and are seeing this problem, then it's something I'm not familiar with. In this situation, please submit a support request so that a Developer Support Engineer can investigate further. It would be helpful if you can include a small sample project that we can run and debug and which demonstrates this behavior, so that we know we're running the same code you're running.