User Profile & Activity

Yudi Member
Page
of 259

I created a simple page of WebGrid based on your description. All its columns created at runtime.

protected void WebGrid1_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
    string Columns = "";
        
    if (!IsPostBack)
    {
        // clear all columns before repopulated
        WebGrid1.RootTable.Columns.Clear();
        WebGrid1.RootTable.SortedColumns.Clear();
        WebGrid1.RootTable.GroupedColumns.Clear();
        WebGrid1.RootTable.FilteredColumns.Clear();

        Columns = "EmployeeID,LastName,FirstName,Title,BirthDate,HireDate,Address,City,Region,Country";
        string[] ColumnsCollection = Columns.Split(',');

        foreach (string Column in ColumnsCollection)
        {
            WebGridColumn col = new WebGridColumn();
            col.DataMember = Column;
            col.Caption = Column;

            WebGrid1.RootTable.Columns.Add(col);
        }
    }
}

Following list shows the step-by-step that were done on my local test in order to test the reported problem.

  1. View RowDisappearWhenFilterApplied.aspx sample file in browser.
  2. After the page loaded, apply filter on BirthDate column through the filter bar. For example: filter text is: 01/01/1960 00:00:00 and filter type is: Less Than.
  3. Move down to a record. For example: "Steven Buchanan" record. Then modify its "City" from London to Manchester.
  4. Save the record by pressing Shift + Enter.
  5. The record doesn't disappear from the grid.

I enclosed my simple sample as attachment. Please have the sample evaluated on your end and let me know if you find anything that I might miss during my attempt to reproduce the problem.

Posted: October 9, 2015 9:49 AM

Please provide following information so that I can help you further.

  • Operating system: is it Windows 8.1 Pro 64-bit or 32-bit?
  • Version of Visual Studio 2015, for example: Microsoft Visual Studio Enterprise 2015.
  • A video that shows the problem (from clicking/running the setup file; input the name and organization; select product edition from "Please select the product edition" dialog; until the problem persist.

I tried to reproduce the reported by problem by running the setup file in various combinations but our efforts were not successful.

Thank you in advance for your patience and cooperation.

Please try to use one of the following snippet code to change checkbox value.

function SetCheckBoxValue(){    // retrieves WebGrid's object    var grid = ISGetObject("WebGrid1");
    var selectedRowObj = grid.GetSelectedObject().ToRowObject();
    var checkboxCell = selectedRowObj.GetCells().GetNamedItem("MyCheckboxColumn");
    var cellElement = checkboxCell.GetElement();

    // use following code to make checkbox checked
    cellElement.children[0].checked = true;

    // use following code to make checkbox unchecked
    cellElement.children[0].checked = false;

    // or invoke click() method to simulates the click event on checkbox
    cellElement.children[0].click();
}

Hope this helps.

Posted: October 8, 2015 9:46 AM

Hi Rupesh,

My colleague, Arief, has managed to create a prototype which allows you to print WebGrid data. Please kindly check his response on this thread and let us know whether it helps or not.

Posted: October 8, 2015 7:57 AM

Thank you for the sent log file. I will check the logfile and will get back to you as soon as possible.


Edited on October 8, 2015 4:00 AM
Reason: Update test result

I tested the installer problem in a fresh PC. It has Windows 8.1 Professional and VS 2015 installed. Please see the attached video which shows the install test.

Could you please right-click on the installer file then select "Properties" from the context menu? The screenshot below shows the "Properties" window of the installer that I use during testing. If you have older version of installer, please try to re-download and let us know if the problem still persist.

Posted: October 7, 2015 7:44 AM

When compatibility mode is enabled, the browser is detected as an old browser. WebGrid will use JS file that utilize attachEvent to binds the specified function to an event, so that the function gets called whenever the event fires on the object.

... So those sites use the <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> solution to force the browser to ignore the compatability settings and render the page in the browsers standard mode, works great except for the webGrid. Webgrid appears to ignore this and uses the compatability mode setting of the browser. So for IE10, the columns are misaligned and in IE11 no data is shown at all ...

Adding the above meta tag will force the old browser to act as modern browser. It will shows exception telling that object doesn't support property or method 'attachEvent' (due to the fact that addEventListener should be used instead of attachEvent).

WebGrid development team propose a solution for such scenario. They will introduce a property which will force use the JS for modern browser. This enhancement is filed under ASPNET-190.

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

Posted: October 7, 2015 4:21 AM

OnExport server-side event of WebGrid will suits your requirement well. You can always change the ReportPath property and other report-specific property such as paper-type, orientation etc, in the ReportInfo object provided by the event argument in OnExport event.

Following snippet code shows how to set Margin and font.

protected void WebGrid1_Export(object sender, ISNet.WebUI.WebGrid.ExportEventArgs e)
{
    // set Font size and Font family
    e.ReportInfo.DynFonts = new DynARFonts(new Font("Tahoma", 15), null, null, null, null, null, null, null, null);
        
    // set Margin size
    e.ReportInfo.DynMargins = new Margins { Bottom = 0f, Left = 0f, Right = 0f, Top = 0f };
}

This should helps.

Posted: October 6, 2015 10:06 AM

Thank you for sharing the workaround with us. ASPNET-188 has been submitted to WebGrid development team regarding the whitespace problem. I will keep this thread updated with any news I heard from the team regarding ASPNET-188.

Posted: October 6, 2015 9:08 AM

Sorry for any inconvenience this problem may have caused you. This problem has been forwarded to WebCombo development team. It is filed under ASPNET-187.

Should I heard anything regarding ASPNET-187, I will let you know by updating this thread.


Edited on October 19, 2015 3:15 AM
Reason: provide solution.

If you are experiencing this issue when create WebCombo programmatically, set the ResultBoxWindowType of WebCombo's LayoutSettings to Normal should resolve the problem.

I modified Programmatic.aspx sample of WebCombo by adding a line of code in combo_InitializeLayout LayoutEventHandler and find that the reported problem is no longer persist.

protected void combo_InitializeLayout(object sender, LayoutEventArgs e)
{
    // Setup Behavior
    WebCombo combo = (WebCombo)sender;
    combo.DataTextField = "ContactName";
    combo.DataValueField = "CustomerID";
    combo.LayoutSettings.ResultBoxWindowType = DisplayType.Normal;
}

Please let me know if you have different result.

Posted: October 6, 2015 7:38 AM
... When the browser is set to Turkish, it either shows a license error, or it shows no data.

I started my investigation by set the browser's language (IE 11) to Turkish. Following step-by-step shows how the browser's language is set to Turkish.

  1. Open IE 11 browser.
  2. Access Tools menu (Alt + X) and select Internet Options.
  3. In General tab, press the Language button (located under Appearance group.
  4. After Language Preference dialog appear, click Set Language Preferences.
  5. Add Turkish language and set it as the primary language (by moving it at the top of the list).

Next, restart the browser and open a page containing WebGrid. Everything worked smoothly and the reported problem was not reproducible.

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

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