User Profile & Activity

leo Chandra Member
Page
of 14

Hi Bruce,

Thanks for your information. It seem that google chrome have a unusuall way of handling an overflowed element (overflowed:scroll) inside a div with width:100%. To fix this, you could use the following workaround to get it working on google chrome:

  • Add the following javascript to your page:
    function EnterEditMode(controlId, tblName, editObject)    {
            editObject.element.style.top = (editObject.cellElement.offsetTop + parseInt(editObject.cellElement.style.borderTopWidth)) + "px";
        }
  • Set WebGrid  OnEnterEditMode client-side event to EnterEditMode
That should do it.

Best Regards,
Leo

Hi Bruce,

I have tried to reproduce this issue by testing Filtering.aspx sample included in installation folder with the following environment:

  1. Google Chrome Version 41.0.2272.76 m,
  2. WebGrid Version 9.0.7200.1,
  3. WebUI Framework version 3.0.5000.913.
Unfortunately, I could not replicate your issue. WebGrid filter was working as intended. I would appreciate it if you could provide me with a sample that I could use to replicate and observed this behaviour.

Best Regards,

Leo

Posted: March 9, 2015 8:04 AM

Hi Thomas,

Thanks for your report. I have submit this issue to our backlog. The backlog for this issue is CROS-745.
I will notify you on any update regarding this issue.

Best Regards,
Leo


Posted: March 9, 2015 6:24 AM

Hi Thomas,

For your first question, you could bind EditButton to viewmodel and set it to the value you want to display. Then set the value acording to current state. The following are the sample code:

BindingProvider:

this.AddBinding("EditButton", BindableProperties.TextProperty, "EditText",BindingMode.TwoWay);
this.AddBinding("TableView", BindableProperties.IsEditingProperty, "IsEditing", BindingMode.TwoWay);

ViewModel:

public string EditText
{
    get {
        return (!base.IsEditing) ? "Bearbeiten" : "Fertig";
    }
}
protected override void OnPropertyChanged(string propertyName)
{
    base.OnPropertyChanged(propertyName);
    if(propertyName == "IsEditing"){
        OnPropertyChanged("EditText");
    }
}


Regarding the second question, you need to create the button and add it to view when InitializeView was called. Then Bind your button to a command in bindingprovider. The following are the sample code on how to do it:

ViewController:

UIBarButtonItem customButton = new UIBarButtonItem();
customButton.Style = UIBarButtonItemStyle.Bordered;
customButton.Title = "Button";
this.SetToolbarItems(new UIBarButtonItem[] { deleteButton, customButton }, false);
this.RegisterViewIdentifier("CustomButton", customButton);

Binding Provider:
this.AddBinding("CustomButton", BindableProperties.CommandProperty, "CustomCommand");

That should do it.


Best Regards,
Leo

Posted: March 5, 2015 10:00 AM

Hi Thomas,

Thanks for your information.
I have look into the empty row behaviour that you have mentioned. It is the default behaviour on iOS. But you could change this behaviour by changing Appearance property that is already defined. Please add the following code to your view controller:

public override TableViewAppearance Appearance {	get {
		var appearence = new TableViewAppearance ();
		appearence.HideSeparatorOnEmptyCell = true;
		return appearence;
	}
}

As an alternative, you could simple change the appearance on InitializeView.

Regarding deselecting a selected row, it is a non-standard behaviour except for multiple selection. But still, you could easily implement this behaviour on view controller OnViewModelPropertyChanged. That should give a control to what to do in view controller when there is a changes to it's viewmodel property. The following a snipet code about how you deselect a selected row after it is clicked:

BindingProvider :

this.AddBinding("TableView", BindableProperties.SelectedItemProperty, "SelectedItem", BindingMode.TwoWay);

ViewModel :

public override Item SelectedItem {
	get {
		return base.SelectedItem;
	}
	set {
		if (base.SelectedItem == value)
			base.SelectedItem = null;
		else
			base.SelectedItem = value;
	}
}

ViewController

protected override void OnViewModelPropertyChanged(System.ComponentModel.PropertyChangedEventArgs e)
{
	if (e.PropertyName == "SelectedItem") {
		if (this.ViewModel.SelectedItem == null) {
			TableView.DeselectRow (TableView.IndexPathForSelectedRow, true);
		}
	}
}

public override TableViewInteraction InteractionMode { get { return TableViewInteraction.Standard; } }
That should do the trick.
note: InteractionMode need to be set to Standard to avoid checked icon on a selected row. Regarding "RowSelected", I will update you later after I discuss it will our developer team.


Best Regards,
Leo

Hi Giridhar JG,

I apologize for any inconvenience this problem may have caused you.

Regarding this issue, it seems IE11 remove attachEvent API in IE11 Compatibility Mode. So please try change X-UA-Compatible to "IE=10" to using WebCombo on IE11 compatibility mode.

Best Regards,
Leo

Hi Leo Hong,

Could you inform me about an application that have implement Pull to Refresh on UICollectionView. Because we have not found an application that have implement this kind of feature. I can help you by requesting this as a feature request. So could you inform me about an application that have implement this feature so we could review it.


Best Regards,
Leo Chandra

Posted: March 2, 2015 10:12 AM

Hi Thomas,

1. You could make a DelegateCommand in ViewModel and bind it to "TableView" SelectedCommandProperty. ex: this.AddBinding("TableView", BindableProperties.SelectedCommandProperty, "SelectCommand");

2. You could try set InteractionMode to ChoiceInput and ChoiceInputMode to Multiple.

3. I have test MyInventory sample with Item data down to 5. The result show there is no empty rows. Please tell me the step-by-step used to produce the issue and provide me with a sample if possible.

4. It's possible to set a label with multiple lines text. After you set the multi line text, you need to specify the number of lines that will use to render the text. It will look like the following code:
label.Text = "Line1\nLine2"
label.Lines = 2;

Hope this useful.

Best Regards,
Leo

Hi Giridhar JG,

Thanks for your sample you have provided.

It seem that there is a problem with your web configuration. WebCombo ScriptDirectory have been set to a wrong path. Please set it as the following:
<add key="ISNet.WebUI.WebCombo.v6_0_7200.ScriptDirectory" value="~/CommonLibrary/WebCombo/V6_0_7200/"/>

Your webcombo should run normally. As a side note, you don't need to specify the above key as 
smart resources was used in your configuration. So as an option, you could just comment/remove the following key in your web configuration:

<add key="ISNet.WebUI.WebCombo.v6_0_7200.SharedScriptDirectory" value="~/CommonLibrary/Shared/"/>
<add key="ISNet.WebUI.WebCombo.v6_0_7200.ScriptDirectory" value="~/CommonLibrary/WebCombo/V6_0_7200/"/>

Best Regards,
Leo

Hi Eray Geveci,

WebGrid has a setting under LayoutSettings called NewRowLostFocusAction to specify what action WebGrid will take once the New Row was lost focus. Set NewRowLostFocusAction to "AlwaysUpdate" to automatically save the data. As an option, you could Set NewRowLostFocusAction to "AlwaysPrompt" to prompt user whether you want to save this data.

Best Regards,
Leo

All times are GMT -5. The time now is 2:01 PM.
Previous Next