User Profile & Activity

Yudi Member
Page
of 259
If the grid has no rows, and user trying to add the first row, it successfully add the new record in the database, but the grid got stock and keep saying at the status bar Add new row ... with wait cursor looping. User has to refresh the screen to exit this stuck!

WebGrid has a sample which similar to your scenario. The sample is: ClientBinding_Transactions.aspx. This sample uses service methods in App_Code/WebService.cs file.

In order to simulate the "grid has no rows" scenario, I made a minor modification to GetCustomers() method in WebService.cs by applying filter to Customers where its CompanyName starts with "Z". This is how GetCustomers look like after apply the filter:

[WebMethod]
public List<Customer> GetCustomers()
{
    NorthwindDataContext context = new NorthwindDataContext();
    context.DeferredLoadingEnabled = false;
    context.ObjectTrackingEnabled = false;
        
    return context.Customers.Where(o => o.CompanyName.StartsWith("Z")).ToList();
}

Save the changes and view ClientBinding_Transactions.aspx sample file in browser. After loaded, WebGrid has no rows.

Next, I added a row. Unfortunately, I was unable to reproduce the reported problem. The grid didn't stuck.

For your information, I'm using WebGrid 9 build 1 and WebUI.NET Framework 3 build 913.

Should you find anything that I might miss during my attempt to reproduce the problem, please feel free to let me know. I'm willing to advise you further but in order to do so I would need you to elaborate on your specific scenario and possibly give me a running simple sample and step-by-step guide that I can use to observe the problematic behavior.

Posted: April 7, 2015 4:07 AM

This scenario has been forwarded to WebGrid development team. The report is filed under ASPNET-160.
I will keep you informed with any news I heard from the dev team regarding ASPNET-160.

Thank you and have a nice day.

Apologize for the delay in sending this.

I have modified the sample and tested on IE 9; IE 10; and IE 11. The reported problem doesn't persist.

To test on different version of IE browser, I use the emulation feature in IE 11 Developer Tools. Please kindly check the video which shows how the page is rendered on different version of IE.

Should you find anything that I might miss during my attempt to reproduce the problem, please feel free to let me know.

Posted: April 2, 2015 8:20 AM

Your requirement, to add a longer text to the presenter on Android, should match with the new presenter, which will be shipped in the next release, called Dialog Presenter. It allows you to add custom input controls to the dialog in addition to default action buttons.

For more detail, please kindly check the "Dialog Presenter" section in Crosslight Roadmap.

Posted: April 2, 2015 7:44 AM

In order to enable VS 2012 (or above) project to use 'async' and 'await' keyword, we need to install (it is not the same as adding reference assembly) Microsoft Async package.

You can find, install, remove, and update packages by using the Manage NuGet Packages dialog box or by using PowerShell command-line commands in the Package Manager Console dedicated Visual Studio window. Both options are accessible from the Visual Studio main menu. You can also open the dialog box from a Solution Explorer context menu.

NuGet is the package manager for the Microsoft development platform including .NET. When you install a package, NuGet copies files to your solution and automatically makes whatever changes are needed, such as adding references and changing your app.config or web.config file. If you decide to remove the library, NuGet removes files and reverses whatever changes it made in your project so that no clutter is left.

You may notice that after install NuGet package, files like app.config; packages.config; repositories.config; etc are added into the project. NuGet is a faster better way to incorporate Microsoft Async library into your project.

Hope this helps.

Posted: March 25, 2015 2:04 AM

Sorry for the delay in sending this.

There might be push notification related code somewhere in the project. You can try to look for this code and remove it to avoid the warning.

However, as this warning doesn't prevent your app from being approved in the App store - if you can't find the code which cause this warning, you can leave it this way.

Please feel free to let us know whether this helps or not.

Nice, how about for other platforms? Like android...

I'd like to update that a nightly build of Crosslight is now available in here. This update includes the feature to display circular image on ListView for Android platform.

Simply ImageSettings property in the activity such as shown in the following snippet code.

public override ImageSettings ImageSettings
{
    get
    {
        return new ImageSettings()
        {
            ImageSize = new SizeF(160, 160), CornerRadius = 80f
        };
    }
}

Hope this help.

Posted: March 20, 2015 8:14 AM

A window is represented by a class that implements IWindow interface which is the basic requirement of a window to be managed by the desktop manager. Examples of window controls that implement the IWindow interface are: UXWindowChrome, UXDialogBox and UXNavigationWindow.

A task bar is represented by a class that implements ITaskBar interface which is required for the desktop manager integration. You use UXDesktopDock control to implement the task bar interface that support desktop manager and window integration.

The most basic implementation to integrate a UXDesktop to a task bar such as UXDesktopDock is by specifying the target task bar instance to the TaskBar property of the UXDesktop. This can be done through element binding in XAML.

The following example shows a basic implementation of integration between the UXDesktop, UXWindow and UXDesktopDock.

<Intersoft:UXDesktop TaskBar="{Binding ElementName=desktopDock, Mode=OneWay}">
	<Intersoft:UXWindow x:Name="wndHome" Header="Welcome to My DesktopApp">
        <Grid>
            <TextBlock Text="Content for UXWindow1" />
        </Grid>
    </Intersoft:UXWindow>
</Intersoft:UXDesktop>
        
<Intersoft:UXDesktopDock x:Name="desktopDock">
	...
</Intersoft:UXDesktopDock>

From the above snippet code, one UXDesktop may only use one task bar (please correct me if I'm wrong). Could you please let me know why would you need to link 2 UXDesktopDock to 1 UXDesktop?

Posted: March 20, 2015 7:17 AM

Thank you for the aspx code.

I noticed that there is a difference between WebGrid1 (in Invoices tab) and WebGrid2 (in Sold Products tab). WebGrid1 has OnInitializePostback server-side event. The custom action from client is sent by HideCommision() JavaScript function.

Could you please try to remove/comment following line from the HideCommision function so that the function will look like following?

function HideCommission()
{
    var grid = ISGetObject("WebGrid1");
    var col = grid.RootTable.Columns.GetNamedItem("speedy_provisionvalue");
    //var col = grid.RootTable.ChildTables[0].Columns.GetNamedItem("speedy_commissionvalue");

    var visCol = !col.Visible;
    document.getElementById('HiddenFieldShowInvCommission').value = visCol;

    //grid.AddInput("action", "ShowInvCommission");
    //grid.SendCustomRequest();
}

Save the changes and view the page in browser. Please let me know whether the problem persist or not.

Posted: March 18, 2015 4:12 AM
can we have two header rows in a grid?

Yes, you can utilize the ColumnSet feature to have two header rows in a grid. For example: following snippet code will create two header rows in WebGrid based on the grid's layout that you post on March 5, 2015.

<ISWebGrid:WebGrid ID="WebGrid1" runat="server" ...>
    <RootTable DataKeyField="CustomerID" RowLayout="ColumnSet">
        <Columns>
            <ISWebGrid:WebGridColumn Caption="Numeric Value" DataMember="CustomerID" Name="CustomerID"
                Width="100px">
            </ISWebGrid:WebGridColumn>
            <ISWebGrid:WebGridColumn Caption="Alphabetical Value" DataMember="CompanyName" Name="CompanyName"
                Width="100px">
            </ISWebGrid:WebGridColumn>
            <ISWebGrid:WebGridColumn Caption="Numeric Value" DataMember="ContactName" Name="ContactName"
                Width="100px">
            </ISWebGrid:WebGridColumn>
            <ISWebGrid:WebGridColumn Caption="Numeric Value" DataMember="ContactTitle" Name="ContactTitle"
                Width="100px">
            </ISWebGrid:WebGridColumn>
        </Columns>
        <ColumnSets>
            <ISWebGrid:WebGridColumnSet Caption="SI. No" ColumnCount="1" Name="ColumnSet0" Width="100px">
                <Layout>
                    <ISWebGrid:WebGridRowLayout ColumnMember="[set your SI.No column member in here]" />
                </Layout>
            </ISWebGrid:WebGridColumnSet>
            <ISWebGrid:WebGridColumnSet Caption="Name" ColumnCount="1" Name="ColumnSet1" Width="100px">
                <Layout>
                    <ISWebGrid:WebGridRowLayout ColumnMember="[set your Name column member in here]" />
                </Layout>
            </ISWebGrid:WebGridColumnSet>
            <ISWebGrid:WebGridColumnSet Caption="Mob. No." ColumnCount="1" Name="ColumnSet2" Width="100px">
                <Layout>
                    <ISWebGrid:WebGridRowLayout ColumnMember="[set your Mob.No column member in here]" />
                </Layout>
            </ISWebGrid:WebGridColumnSet>
            <ISWebGrid:WebGridColumnSet Caption="ID Mo." ColumnCount="1" Name="ColumnSet3" Width="100px">
                <Layout>
                    <ISWebGrid:WebGridRowLayout ColumnMember="[set your Id.Mo column member in here]" />
                </Layout>
            </ISWebGrid:WebGridColumnSet>
        </ColumnSets>
        <ColumnSetSettings RowCount="1" ShowHeaders="Yes" />
    </RootTable>
</ISWebGrid:WebGrid>

Result:


Hope this helps.

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