All Answers

0 votes
In reply to: DataGridView ForeColor

The DataGridView doesn’t have the ForeColor property, like in WinForms.

You can set the ForeColor like this:

  • this.Column1.HeaderStyle.ForeColor.
  • this.dataGrid1.Rows[0].DefaultCellStyle.ForeColor;
  • this.dataGridView1.DefaultCellStyle.ForeColor;
  • this.Column1.DefaultCellStyle.ForeColor;
  • this.dataGridView1.Rows[0].Cells[0].Style.ForeColor;
  • this.dataGridView1.Rows[0].HeaderCell.Style.ForeColor;
  • this.dataGridView1.TopLeftHeaderCell.Style.ForeColor;
  • this.dataGridView1.RowTemplate.DefaultCellStyle.ForeColor;

 

 

 

 

 

 

  • Luca answered Sep 3, 2019 - 5:57 pm
0 votes

Well, I gone through these threads. I wanted to process uploaded files in excel/csv by reading all records (say customer records into Customer table) & importing them into database. How can I read an excel file using WiseJ or any 3rd party extension?

 

0 votes

Hi Abaid,

here is some discussion about working with Excel files:

https://wisej.com/support/question/microsoft-office-interop-excel-application

Apart from that it depends on what your goal is:

Provide some server generated data for the client to Download ?

Then our Download sample might come in handy:
https://github.com/iceteagroup/wisej-examples/tree/2.0/Download

Have the client Upload some data that is then processed on the server ?

In this case please refer to our Upload sample:
https://github.com/iceteagroup/wisej-examples/tree/2.0/UploadFiles

Best regards
Frank

0 votes

Hi Cristian,

you´re right. There was a problem in the deploy process.
It´s fixed now. Please redownload 2.0.40.

Best regards and thanks,
Frank

0 votes

Abaid,

how to determine which packages are required depends on the 3rd party creator of the widgets to be used.
A good approach IMHO to watch out for samples that are using the widget.

For the SyncFusion GridView you might want to look here for example:

https://help.syncfusion.com/js/grid/getting-started

Hope that helps.

Best regards
Frank

0 votes

Thank you Tim for referring to TagInput control. But my question was “how to identify the Packages for a certain 3rd party control?”. I selected AutoComplete just for reference. I would like to use Syncfusion GridView control as it allows CSV, Excel & PDF export.

Please share what packages to add in Widget control & what to set in Initial Script!

0 votes

For the autocomplete check out the blog post and sample code on using the ‘Tag Input’ control.

New controls in Wisej: NavigationBar, SideButton, FlexLayoutPanel, TagInput, Switch

HTH -Tim

0 votes

The issue was that i was referenced Wisej.Ext.MaterialDesign.dll vs: 1. I change to vs 2, and works.

 

0 votes

Eyal,

thanks for your help in tracking this down.

Issue #1961 is fixed in the latest Wisej release build (2.0.40).

Best regards
Frank

0 votes

Hi Tim,

this issue (#1962) is fixed in the latest Wisej release (2.0.40).

Best regards
Frank

0 votes

Hi Joyce,

thanks for your report. We tried to reproduce the problem based on your description but failed.
Could you please try to wrap up a test sample that shows this issue ?

You can either post it here or send it to frankATiceteagroup.com

Thanks in advance !

Best regards
Frank

1 vote

This is issue is caused only by 1 problem, the VS designer is loading multiple Wisej assemblies. They may have been left in \bin or one of the references have a different version, etc.

  • Close the designer.
  • Delete \bin and \obj
  • Recompile
  • Check that \bin and \obj only have Wisej.Framework and NOT Wisej.Core or Wisej.Web (1.5)
  • Close VS, Reopen VS.
  • Try again.

 

 

 

  • Luca answered Aug 31, 2019 - 6:25 pm
0 votes

Hi Eyal,

Could you shoot me a message at levie AT iceteagroup dot com so we can provide you with a prebuild and verify that it solves your issues?

Best regards,

Levie

0 votes

When adding/changing a data source while loading (before the container is created and visible) the BindingContextChanged event is fired multiple times (when the parent changes, when the control is created which happens when made visible, etc.) In your case when , Windows6 (mdi child) is created second, it’s created hidden and then made visible when it becomes active so you get the population twice. When created first it’s created already visible. That’s why there is the DataBindingComplete event to handle the data-bound rows. You get a similar behavior in winforms.

The binding context is important to sync all the controls sharing the same data source.

I also tried

Private Sub DataGridView1_RowsAdded(sender As Object, e As DataGridViewRowsAddedEventArgs) Handles DataGridView1.RowsAdded
Me.DataGridView1.Rows(e.RowIndex).ReadOnly = True
End Sub

The issue you see is that your winforms code assumes that e.RowCount is always 1, while Wisej adds the data rows in bulk and fires RowsAdded with e.RowCount = (count) so you should do this:

Private Sub DataGridView1_RowsAdded(sender As Object, e As DataGridViewRowsAddedEventArgs) Handles DataGridView1.RowsAdded
For i = 0 To e.RowCount – 1
Me.DataGridView1.Rows(e.RowIndex + i).ReadOnly = True
Next
End Sub

In any case, DataBindingComplete is a better event to handle.

 

  • Luca answered Aug 29, 2019 - 3:36 pm
0 votes

Hi Tim,

we could reproduce the issue now and are fixing it.
The fix will be included in the next build.

Best regards
Frank

0 votes

Hi Huynh,

thanks for reporting this.

In your case the best way to fix the problem is to move the disabling part of the rows into
a handler for the DataBindingComplete event.

Otherwise when only disabling in the Load event you risk that the BindingContextChanged event
is fired again and the rows might get recreated and then be enabled.

The same problem can also happen in WinForms so the safest bet is to rely on the DataBindingComplete event.

Best regards
Frank

0 votes

Hi Tim,

any chance to wrap up a test case or describing in more detail where that failing dropdown
differs from the others that are working fine ?

Thanks in advance !

Best regards
Frank

0 votes

Hi Eyal,

thanks for the test case and reporting this problem.
It´s logged as #1961 and we are working on a fix.

We´ll inform you when a new build is available.

Best regards
Frank

0 votes

Attached is the project

Showing 5561 - 5580 of 11k results