User Profile & Activity

Yudi Member
Page
of 259
Posted: February 28, 2016 7:23 PM

OnNodeSelect client-side event of WebTreeView is used to collect the last position of the vertical scrollbar by obtaining the scrollTop property then store the value in HiddenField control. The OnNodeSelect client-side event specifies the client side (JavaScript) function name that will be invoked when node is selected. Parameters: (controlsId, node).

function WebTreeView1_OnNodeSelect(controlId, node)
{
    // collecting the last position
    // of the vertical scrollbar
    // by obtaining the scrollTop property

    var treeView = ISGetObject(controlId);
    var frameElement = treeView.GetFrameElement();

    // obtain the scrollTop property 
    // of the vertical scrollbar
    var verticalPosition = frameElement.children[0].scrollTop;

    // store the value scrollTop position in HiddenField control
    form1.ValueHiddenField.value = verticalPosition;

    return true;
}

Next, invoke the ApplyLatestScroll() JavaScript function from OnNodeSelectChanged event.

protected void WebTreeView1_NodeSelectChanged(object sender, ISNet.WebUI.WebTreeView.WebTreeViewNodeEventArgs e)
{
    // This event fires after the selected treeview nodes are changed.

    // invoke ApplyLatestScroll() function to set back the scroll position.
    Page.ClientScript.RegisterStartupScript(this.GetType(), "ApplyLatestScroll", "ApplyLatestScroll();", true);
}

The ApplyLatestScroll() JavaScript function is:

function ApplyLatestScroll()
{
    // set back the previous scrollTop property or
    // vertical scroll position

    var treeView = ISGetObject("WebTreeView1");
    var frameElement = treeView.GetFrameElement();
            
    // manually configure the vertical scroll position
    frameElement.children[0].scrollTop = form1.ValueHiddenField.value;

    return true;
}

I enclosed my simple sample for your reference. Please let me know whether this helps or not.

Posted: February 25, 2016 9:10 AM
... change the color of the titlebar ...

Change the color of titlebar can be done by specifying the WindowStyle of WebDialogBox-WindowSettings.

Example:

<ISWebDesktop:WebDialogBox ID="WebDialogBox1" runat="server" Height="150px" Width="400px"
    Text="Metro Style DialogBox">
    <WindowSettings CaptionButtonSpacing="0" WindowHeaderHeight="28" ApplyContainerStyle="true">
        <WindowStyle>
            <Active BaseStyle="Normal" BackColor="Red" BorderColor="#5386BD" BorderWidth="1px"
                BorderStyle="Solid">
                <Padding Bottom="4px" Top="4px" Left="4px" Right="4px" />
                <BorderSettings>
                    <Top Style="none" />
                </BorderSettings>
            </Active>
            <Normal BackColor="#E9E8EE" BorderColor="#E9E8EE" BorderStyle="Solid" BorderWidth="1px"
                Font-Names="Segoe UI, Arial" Font-Size="8pt" Height="100%" Overflow="Auto" OverflowX="Auto"
                OverflowY="Auto" Width="100%">
                <BorderSettings>
                    <Top Style="none" />
                </BorderSettings>
            </Normal>
        </WindowStyle>
        ...
    </WindowSettings>
    ...
</ISWebDesktop:WebDialogBox>

Result:



... and the color of the titlebar text of my webdialogbox ...

Change the color of titlebar text can be done by specifying the CaptionStyle of WebDialogBox-WindowSettings.

Example:

<ISWebDesktop:WebDialogBox ID="WebDialogBox1" runat="server" Height="150px" Width="400px"
    Text="Metro Style DialogBox">
    <WindowSettings CaptionButtonSpacing="0" WindowHeaderHeight="28" ApplyContainerStyle="true">
        <CaptionStyle>
            <Active BaseStyle="Normal" ForeColor="White">
            </Active>
            <Normal Cursor="Default" Font-Bold="True" Font-Names="Segoe UI, Arial" Font-Size="10pt"
                ForeColor="Gainsboro">
            </Normal>
        </CaptionStyle>
        ...
    </WindowSettings>
    ...
</ISWebDesktop:WebDialogBox>

Result:



This should helps.

OnCellClick client-side event specifies the client side (JavaScript) function that will be invoked when a cell is clicked. It has following event parameter: controlId, tblName, rowIndex, cellIndex, cellEl.

Following snippet code shows how to obtain row's key value in OnCellClick client-side event. Instead of using rowIndex, cellEl parameter is used to obtain row object through GetRowByElement(element) method.

function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl)
{
    // get WebGrid object
    var grid = ISGetObject(controlId);

    // get row object
    var rowObj = grid.GetRowByElement(cellEl);

    if (rowObj.Type == "Record")
        alert("Key value of selected row is: " + rowObj.KeyValue);

    return true;
}

This should helps.

Posted: February 19, 2016 7:37 AM

Sorry for any inconvenience this problem may have caused you.

Need to add InvariantCulture when parsing Price property in ItemRepository.cs. This change has been submitted to the git. Please obtain the latest update of this sample and let me know if the problem still persist.

Posted: February 19, 2016 3:19 AM
1. There is no sample where the entry in the drawer list is initially selected. When you first navigate the entry in the drawer list gets selected. Is this still possible?

Thank you for the valuable feedback.

The Crosslight development team has managed to implement this where the drawer item is initially selected. It is implemented in Crosslight assembly. After download the latest sample, please ensure that nuget packages are updated.

Should you have different result, please feel free to let us know.

2. Translucent sample: The drawer list entries have icons here. But a white icon on a white background is invisible. The icon gets only visible when a drawer list entry is selected after navigating (see attached screenshot). Is this intended?

The team has made the color of the icon to be darker. Thank you for this feedback.

Please get the latest changes of the sample and let me know your response.

3. Worthy sample: How could someone know that there is a right side drawer? There is no icon to activate this drawer.

Crosslight provides sample of basic usage of the drawer UI component with only the right drawer. You can find it in FacebookStyle sample.

The app shows the hamburger icon on the left. When user press it, drawer will slide from the right.

We don't add the hamburger icon on the top-right side. This location usually used for other bar items such as: search, add, etc.

Should you have any idea or feedback about the icon on left-and-right drawer scenario, please feel free to let us know.

Posted: February 19, 2016 1:46 AM

Thank you for the reminder.

The ShowActionBarUpButton property is used to show the "back button" on the top left side of action bar. In the new build of Crosslight, it has been handled automatically. No need to override the property. We have removed the following code in the samples:

protected override bool ShowActionBarUpButton
{
    get { return true; }
}

If needed, developer can set this property in fragment such as shown in the following snippet code:

this.ToolbarSettings.BackButtonVisibility = BackButtonVisibility.Collapsed;

Please try to get the latest update of the sample then update the nuget package (to get the latest Crosslight assembly).

Please feel free to let us know if the problem still persist.

Posted: February 18, 2016 8:12 AM
... ItemRepository: Line 54: Missing CultureInfo.InvariantCulture -> App crashes in none US cultures...

The team has fixed this problem by adding InvariantCulture when parsing Price property in ItemRepository.cs file. The changes has been submitted to the repository sample.

Please update the sample and let us know if the problem still persist.


Group List with Index: Where is the index? I only see a list but no index (A,B,C,...) on the side.

The Index on Group List is not available in the current update. The team for sure will implement this on the next update.


Searchable List: Click on the magnifying glass icon (top right corner) and enter "apple". The list is reduced to 4 entries. Click on the cross (top right corner). All list entries appear again. Click again on the cross (top right corner). The list is now empty. Is this intended?

The development team is investigating this problem at this moment. You can test the same steps on MyInventory sample for the correct behavior.

Posted: February 18, 2016 6:03 AM

Thank you for the report and sorry for any inconvenience this problem may have caused you.

The problem can be reproduced in our local end when build the solution using VS 2013. The reported problem doesn't persist on VS 2015.

Currently Crosslight development team is fixing this problem. I'll keep this thread updated with any news from the team regarding this problem.

Posted: February 18, 2016 4:56 AM

Could you please provide more information that might helps to determine the problem, such as:

  • WebGrid version, for example: 9.0.7200.8.
  • WebUI.NET Framework 3.0 version, for example: 3.0.5000.916.
  • Does the problem happen on specific browser? If yes, please let us know about the browser version. For example: Google Chrome 48.
  • Information about how data is bind to WebGrid. For example: binding data to WebGrid using client-binding WebService; or binding data to WebGrid using SQLDataSource control.

Look forward to hearing back from you.

Sorry for the delay in sending this.

The reported problem has been forwarded to Crosslight development team to be investigated further. It is filed under CROS-1026.

I found that the problem is specific with nested-modal using FormBuilder scenario. I did the following test and found that the problem doesn't persist.

  • Use nested-modal without FormBuilder
  • or Use Push NavigationMode
    Set the NavigationMode to Push in SimpleViewModel.cs (as shown in the following snippet code).
private void ShowToast(object parameter)
{
	var p_Parameter = new NavigationParameter()
	{
		ModalPresentationStyle = ModalPresentationStyle.FormSheet,
		NavigationMode = NavigationMode.Push,
		EnsureNavigationContext = true
	};

	this.NavigationService.Navigate<LocationListViewModel>(p_Parameter);
}

I will keep this thread updated with any news I heard from the team regarding CROS-1026.

All times are GMT -5. The time now is 7:23 AM.
Previous Next