All Answers

0 votes

Yes! How did I do to not see the UserDeletingRow and UserDeletedRow events!?,
thank you Luca Sky Walker

 

0 votes

The clients will have to register themselves. A simple http request (ashx handler would do). They can send their name or anything else as an argument. The server can keep track of the clients by name or id and should also save their IPs (use Application.UserHostAddress to read the IP of the client that is registering).

Then the server can send requests back to the IP address of the clients.

If the client is rebooted or if the client uses a dynamic IP that may change, the the client should simply periodically refresh its IP again through a simple http request.

  • Luca answered Jun 13, 2018 - 11:42 pm
0 votes

Cells are not widgets and don’t have a location or size, they are rendered in the browser by building the HTML using the various cell renderers.

You can use Control.MousePosition.X for the X position, it’s already relative to the screen.

You can calculate the top or bottom of the cell in CellMouseDown like this:

for (int i = this.dataGridView.FirstDisplayedRowIndex; i <= e.RowIndex; i++)
{
  bottom+= this.dataGridView.Rows[i].Height;
}

Add the header height.

        bottom += this.DataGridView.ColumnHeadersHeight;

Convert to screen.

       var loc = this.DataGridView.PointToScreen(new Point(0, bottom));

Show the popup.

       popup.ShowPopup(Control.MousePosition.X, bottom);

To align the left position is more complicated since the columns may scroll partially.

 

  • Luca answered Jun 13, 2018 - 11:37 pm
0 votes

Check the UserDeletingRow and UserDeletedRow events.

  • Luca answered Jun 13, 2018 - 11:12 pm
0 votes

Check the UserDeletingRow and UserDeletedRow events.

  • Luca answered Jun 13, 2018 - 11:12 pm
0 votes

Found the problem. Works when changing the culture, but doesn’t work when the culture is already changed at startup. Logged, will be fixed in the current dev build.

  • Luca answered Jun 13, 2018 - 11:05 pm
0 votes

Can’t reproduce. Can you reproduce in a separate small app? I dropped a groupbox, added some controls, add a binding source:

this.groupBox1.DataBindings.Add(new Wisej.Web.Binding(“Enabled”, this.dataBindingSource, “CanSave”, true));

Closed, reopened. Always works.

 

  • Luca answered Jun 13, 2018 - 11:03 pm
0 votes

The e.RowIndex is correct. It’s the index of the removed row. The sample app is using the deleted index to read the value from the row collection, but the row has been deleted (removed from the collection) so the index is referring to the next row now. The event RowsRemoved is fired after the rows have been removed. There is no event fired before the rows are removed – it’s entirely up to the application.

There is a bug with the initial RowRemoved (index 0) events with count 0. Logged will be fixed in the current dev build.

  • Luca answered Jun 13, 2018 - 10:56 pm
0 votes

Hi Marian,

I can’t reproduce the behaviour you describe. I attach a sample.

0 votes

I see, that’s nice. But why does it not set Thread.CurrentUICulture anymore? Thread.CurrentCulture appears to be set properly still, but Thread.CurrentUICulture is always en-US for me. Thread.CurrentUICulture is necessary for ResourceManager I believe.

0 votes

Ok, Thanks, waiting for the fixing

  • Guest answered Jun 12, 2018 - 4:07 pm
0 votes

Hi again,

While we fix the issue, you can use a workaround:

Insert an extra line before setting the Width value you want, like this

Snippet

((Wisej.Core.IWisejComponent)dataGridView1.Columns[0]).Configuration.width = 0;
dataGridView1.Columns[0].Width = 300;

 

  • Tiago (ITG) answered Jun 12, 2018 - 3:50 pm
  • last active Jun 12, 2018 - 3:54 pm
0 votes

Thanks for the sample. I could reproduce. Logged as WJ-8984.

0 votes

Thank you for sample. It works fine here, but I see what the problem is:

localhost:8080/Handler1.ashx?name=Test

The handler is found and executed correctly.

You get 404 probably because you are not using the handler but the url mapping in web.config, which is a non-existing url mapped to the handler.

localhost:8080/post-data?name=Test returns 404 with the self hosted executable.

You can fix this in WisejMiddleware.cs, see method ProcessSubApplication(IOwinContext context), the last line is:

return this.Next.Invoke(context);

Change it to:

return ProcessAspNetRequest(context);

The mapping doesn’t have an extension so Wisej Middleware tries to execute a sub application. Change that line and the mapping will work. Or you can address the handler directly as shown above.

 

  • Luca answered Jun 12, 2018 - 3:10 pm
0 votes

Hi,

here is a test sample that used in video, where i added an another button that set the width of the first column at 300.

if do as in the video, you can see this problem, after button click and change width with mouse, the second click on button don’t change the width visually.

if i first time change with mouse the width, hit one of the button it works, after that when change again with mouse and hit one of buttons is stop works, but, if i hit one button then the other it restart works, i can’t understand where is the problem, and why when i do in the for(columns) loop the column update it didn’t work but in the ColumnWidthChanged Event column update yes.

I hope i have expressed myself well

  • Guest answered Jun 12, 2018 - 1:52 pm
0 votes

Hi,

Can you attach a sample?

Thanks.

0 votes

Hi Marian,

in release 1.4.95 there was a change

WJ-8932 New Feature ApplicationBase.CurrentCulture make setter public

Before this change you had to add ?lang=<culture> to the URL, something like

ApplicationBase.Navigate(ApplicationBase.Url + “?lang=” + “fr”);

This new feature makes setting the CurrentCulture easier. As you can see on this thread, this should be used like this

Application.CurrentCulture = CultureInfo.GetCultureInfo(“fr”);

Application.Reload(); // needed so Wisej can fetch the resources for the new culture

 

  • Tiago (ITG) answered Jun 12, 2018 - 12:13 pm
  • last active Jun 12, 2018 - 12:14 pm
0 votes

Hi Frank,

I followed your suggestion and I solved the problem

Thank you very much

0 votes

Luca,

I’ve attached a simple handler test project which does work in vs, but not in owin.

This is basically the example you gave me a while back.

You’ll see the Wisej.HostService.exe in the project, along with a shortcut. The shortcut is for setting the port and localhost in the arguments.

Thanks

  • Darren answered Jun 12, 2018 - 8:31 am
0 votes

Hi,

i tested and same problem, i registered a little video where show the problem, try to explain: the first time when use the mouse to change the width and after that hit the button it works, but after that (hitting the button) if change again with mouse the width and retray to hit the button it did not works,  even if at the code level the width was changed.

I tryed to do DGV Refresh(), Update(), column update and nothing; but yesterday i will found i little solution that it would seem work, intercept the ColumnWidthChange Event, and here do a column Update().

 

  • Guest answered Jun 12, 2018 - 7:11 am
Showing 7281 - 7300 of 11k results