User Profile & Activity

James Member
Page
of 14
Posted: September 2, 2009 10:59 PM

George,

You can do the row selection from server-side, although not the paging for now.

For the row selection, use this:

grid.RootTable.Rows[index].Selected = true;

Let me know how it goes. 

Posted: September 2, 2009 12:49 PM

Yes, you can uninstall existing installation manually, or let the Sp1 installer do it automatically for you.

Posted: September 2, 2009 11:35 AM

Vince, the code that Glenn provided above should do it. Doesn't that work for you?

- James

Posted: September 2, 2009 11:19 AM

Have you tried to create new ASP.NET application?

Also, does Intersoft Live samples that come with the installation package work? Can try both the Live Samples (executable) and C# Solution sample project.

Let me know which one work and which one not -- in details.

Posted: September 2, 2009 11:13 AM

Hi Indra,

The following Javascript code will hide the column using Grid's built-in AJAX request.

<script type="text/javascript">
    
        function HideColumn()
        {
            var grid = ISGetObject("WebGrid1");
            var col = grid.RootTable.Columns.GetNamedItem("EmployeeID");
            
            col.Set("Visible", "false", true);
            grid.RefreshAll();
        }
        
    </script>

This approach should be more solid since the Grid will re-initialize all settings after the column is removed.

I hope it works for you. 

- James.

Hi Memo,

Per my testing, the filter bar does take account the white space. I tried to enter "INTER SOFT   SOLUTIONS" in the filter column, and then inspect the value in the server side.

Here's the result that I found:

WebGrid1.RootTable.FilteredColumns[0].FilterText; // Result is "INTER SOFT    SOLUTIONS"

Could you confirm if you got the same result?

Hope this helps,
James.

Posted: September 2, 2009 10:46 AM

Yaniv, it's quite weird that your system references are affected. I don't think you need to reinstall .net framework 3.5 as the WebUI installation doesn't affect system and .net references.

I suggest you to clear the ASP.NET temporary files. You'll need to stop your IIS first before deleting the temporary files. Then rebuild your Visual Studio project.

In case it still didn't work, try to create a blank ASP.NET project and run a blank webform. 

Posted: September 2, 2009 8:39 AM

Yanic, is that error happening in your "Silverlight" project?

AFAIK, .NET references should have v3.5 version, not 2.0.5. Silverlight used 2.0.5 though.

Posted: September 2, 2009 8:29 AM

Michael,

Here are some pointers for you:

  1. The error could happen if you're not running the latest WebUI Framework. I suggest you to download and install the latest service pack that Intersoft recently released.
  2. I doubt that it's a postback. To ensure, can you check if your browser has "back" history? The IE progress bar sometimes appear during AJAX callback, which has been a known issue for sometime.  To double check, you can try it in Safari or other browsers.
  3. I'm pretty sure the server event is fired, but I guess it couldn't set the lbl.Text because the server event is invoked in FlyPostBack (AJAX) context, not full postback. To ensure, try to put a breakpoint to the code and see if Visual Studio goes into the breakpoint.
  4. The OnCompleted client event will be fired when an upload session is completed. A session is counted as a series of uploaded files. Eg, if user uploaded 5 files, then this event will be fired when all 5 files are uploaded.

Hope this helps,
James.

Posted: September 2, 2009 8:07 AM

George, in normal GUID case, the Grid should be able to insert the row successfully without additional code. However, your case is a bit different since the GUID is assigned in the backend, and not from front/middle layer.

Fortunately, WebGrid has a solution for your scenario which is very similar to the solutions in the KB article that Gordon provided. In short, you need to pass the GUID from backend into datasource level which involves two phases:

  1. Define an InputOutput parameter in the InsertParameters of your ISDataSourceTable definition.
    Example:
    <InsertParameters>
                <asp:Parameter Direction="InputOutput" Name="BusinessID" Type="Object" />
    ... 
  2. Customize/extend your DoInsert method which retrieve the GUID that assigned in the backend, and pass it back to the InputOutput parameter. 
    Example:
    DataObjectMethodAttribute(DataObjectMethodType.Insert, true)]
    public int DoInsert(ref System.Guid BusinessID, ...)
    {
        // your insert call to SP
        objecet returnValue = DAL.InvokeYourInsertSP(params);
        // assign the returnValue, which should be the GUID value from your SP call
        BusinessID = returnValue;
    }

The above code assumes that your SP should return the GUID value properly, as in the case of Northwind sample where it returns the identity of the OrderId.

When an InputOutput parameter (ref) is assigned back from DoInsert method, WebGrid automatically detects the new value and assign it to the datasource and UI. 

Hope this helps,
James.

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