User Profile & Activity

Yudi Member
Page
of 259

You might want to try the multi-line column header approach. Please set following properties:

  • WebGrid > LayoutSettings > HeaderWrapDefault="True"
  • WebGrid > LayoutSettings > RowHeightDefault="-1px"

By doing so, you can have multi-line column header such as shown in the following:

Please let me know if this suits your scenario.
Note: simple sample is enclosed as attachment.

I created a simple WebGrid based on your scenario. The grid columns are created dynamically at PrepareDataBinding server-side event.

string[] Profile1_Root = { "OrderID", "ProductID", "UnitPrice", "Quantity", "Discount" };
    
protected void WebGrid1_PrepareDataBinding(object sender, DataSourceEventArgs e)
{
    if (!IsPostBack)
        CreateStructure();
}

private void CreateStructure()
{
    foreach (string col in Profile1_Root)
    {
        WebGrid1.RootTable.Columns.Add(new WebGridColumn(col, col, col));
    }
}

After grid rendered, the root table is grouped by OrderID column (where this column is of int type column). The reported problem is not reproducible when try to export this to html.

For your information, I'm using following configuration in my local end to test the problem.

  • WebGrid 10.0.7200.24
  • WebUI.NET Framework 3.0.5000.975
  • IE 11 browser
  • CannotFindNumericColumn.aspx sample page (enclosed as attachment)

You may modify my sample if you find that the sample is not close to your scenario/code.

I have noticed in Google Chrome the statusbar does not show a status when first loaded. ...

I checked the reported problem on WebGrid 10.0.7200.24 (and WebUI.NET Framework 3.0.5000.975). The grid is pretty simple, AllowFilter="Yes" and ShowFilterStatus="True". When first loaded (in Chrome 51), the status bar shows the filtered status without problems.

Could you please provide more information regarding the missing information in status bar of WebGrid when initially rendered in Google Chrome so that I can assist you further?

Posted: June 22, 2016 3:10 AM

I'd like to update that Crosslight development team has implemented some of your request, specifically CROS-1100.

We'll promote this improvement in Crosslight 5 Update 4. However, you can get it tested first. Please feel free to let me know so that I can send you the detail.

Thank you.

This is limitation for non IE browser. Browser like Firefox will block access to the clipboard by default.

By default, JavaScript is not allowed to read or set your clipboard data for security and privacy reasons.This is because websites scripts can erase and replace what you currently have in your clipboard (data loss issue) and they can read whatever you have in your clipboard (security and privacy issue); as such, you should grant access with caution.

Source: http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard.

Hope this helps.

Posted: June 21, 2016 8:13 AM

I found that "Copy this Table" works on client-binding WebGrid. You can try to test this feature on the live sample of WebGrid in these samples:

I have forwarded this information to WebGrid development team and update this thread with any news I heard from the team regarding to ASPNET-149.

Could you please test the sample of WebCombo, LinkedWebCombo_Multiple.aspx, and let me know the result?

Per my test (using WebCombo 6.0.7200.260 and WebUI.NET Framework 3.0.5000.972), there is no problem with the sample. The CategoryID column is hidden from the WebCombo's ResultBox (of Category WebCombo).

It was tested on IE 11, Chrome 51, and Firefox 47.

Look forward to hearing back from you.

Posted: June 17, 2016 2:19 AM

Thank you for the prompt feedback.

The appearance issue of FormBuilder multiline Text View has been forwarded to Crosslight development team. The report is filed under CROS-1158.

I will keep this thread updated when the nightly-build hotfix is available to be evaluated.

Posted: June 16, 2016 6:23 AM

Build 675-experimental is now available in NuGet which addressed following issue: CROS-1148. Please give it a spin and let us know how it works in your end.

Posted: June 16, 2016 2:34 AM

Following JavaScript function will show you how to sets a cell from the selected row not to allow editing.

function SetNoEdit()
{
    var grid = ISGetObject("WebGrid1");

    if (grid.GetSelectedObject() == null)
    {
        alert("Please select a row.");
        return;
    }

    var row = grid.GetSelectedObject().GetRowObject();
    var cell = row.GetCell("ProductName");

    if (row.Type == "Record")
        cell.SetForceNoEdit(true);
    else
        alert("Please select a Record Row");
}

The SetForceNoEdit(boolean) forces this cell not to allow editing. If parameter is null or not specified then the default is true. If this is set to false, the cell would be editable.

Check out this WebGrid live sample which demonstrates WebGrid's client-side API. Click the "Set City as not editable for new row only" button and see how it works.

Hope this helps.

All times are GMT -5. The time now is 12:51 PM.
Previous Next