stop form refresh
hi friends i have a problem, plz help me out.
i have a vb.net form with grid view and "export to excel" button. grid view has date column which displays date in this form> 21-02-2012 but once i click on "export to excel" button the grid view data is exported to excel. After exporting the form gets refreshed and date gets changed to 02/21/2012 (check this date and month is interchanged) or 21 feb 2012.
how do i stop this grid view or form from getting refreshed.
It's not like it just happens of it's own accord and you have to do something specific to stop it happening. If it's happening then it's because your code is doing it. If you want it not to happen then don't make it happen. As to what it is that you're doing that makes it happen, we can't possibly know because we don;t know what you're doing.
Just to be clear, you are saying that the format of the dates in the DataGridView changes when you perform the export, right?
Yes you are right.
The gridview in my program is defined as follows:
Me.gridview1.MappingFeilds = "InvoiceNumber[Invoice-Number],InvoiceDate[Invoice-Date]"
Invoice-Date> is gridview1 column name
InvoiceDate> is column name in database
How do i change the date formate?
I'm afraid that I have no idea what control you're talking about. There is no GridView control in Windows Forms so I assumed that you were talking about a DataGridView, but it has no MappingFields property. In fact, I just searched MSDN and there was no matches for MappingFields at all. That would suggest that you are using a third-party grid control, which is not information that we should have to guess. You need to provide us with ALL the relevant information.
Re: stop vb.net form refresh
Excel is a annoying with dates, you sure the export isn't fine, but when opened in excel, excel changes the formatting?
Sent using XT910 with Android 4.0.4 and MIUI 2.8.10