User Profile & Activity

Glenn Layaar Support
Page
of 99

Do you mind providing a runnable project that would demonstrate the issue? The project would also enable us to understand the issue you are facing with WebGrid quicker and more easily.

This issue is a known bug in the release build of ClientUI, a fix is already implemented and is scheduled to be released on the next hotfix.

Posted: October 11, 2010 12:18 AM

Thank you for the simple project, I have uscessfully replicated the sample on my environment. After discussing the issue with the developer, he has concluded that the issue is caused by a bug. A bug report has been submitted and a fix is scheduled in the next build of DataPresenter.

FYI, the property DataLoadingMode="PagedData" EnablePaging="Yes" PageSize="10" will caused the GridPresenter to use its internal paging mechanism, since your paging function is done in the ViewModel you will not need to set the property in the GridPresenter.

Under such scenario, you will be required to create a new class to hold the new object. In my sample, I create a BugCustom class that will allow me to hold the new property. Here is the snippet:

Class definition

public class BugCustom
{
public int BugId { get; set; }
public string Summary { get; set; }
public string OwnerName { get; set; }
}

Select function (I do not have the Owners table, the select is simulated to return row with 3 column)

[WebMethod]
public object GetPagedBugsCustom(DataSourceSelectArguments selectArguments)
{
BugTrackerModelDataContext context = new BugTrackerModelDataContext();
context.DeferredLoadingEnabled = false;

var datasource2 =
from b in context.Bugs
select new BugCustom { BugId = b.BugId, Summary = b.Summary, OwnerName = "TestOwner" };


WebGridDataProvider<BugCustom> provider = new WebGridDataProvider<BugCustom>(datasource2.AsQueryable());
object data = provider.Select(selectArguments);

if (data != null)
return data;

throw new InvalidOperationException("Unsupported operation type!");
}

The WebGrid client binding setting property

<ClientBindingSettings DataLoadMode="PagedData" DataSourceType="WebService" PreloadGroupTotals="true"
ItemTypeName="BugCustom" ServiceUrl="WebService.asmx" EnableGroupRowPaging="true" GroupRowPageSize="20">
<ServiceMethods SelectMethod="GetPagedBugsCustom" />
</ClientBindingSettings>



 

Posted: October 8, 2010 12:05 AM

Based on my further discussion with the developer, the WebTextEditor must be contained in a control that allow datasource binding such as FormView to allow WebTextEditor binding with data source, as demonstrated in IntegrationToFormView.aspx.

The developers line of thinking is they usually expect a collection of row when returning data from a database so the WebTextEditor will need to be contained in collection container control that allow template..

Posted: October 7, 2010 11:55 PM

Using a simplified snippet with only the enter key conditional I have no such issue on my test page in my environment. Attached is the test page I am using, you will need to have northwind.mdb which is available from the provided Intersoft WebGrid sample.

I am also using the latest WebGrid 7 and WebUI Framework 3, build 404 and 755 respectively.

Posted: October 7, 2010 10:40 PM

The proposed fix will be similar to the WebService implementation. You will need to use DataSourceSelectArguments as your select method parameter. The DataSourceSelectArguments will contain a tag property which you could use to hold you custom select arguments. This tag property will be filled during the client side selecting service event.

Selecting client side event

function GetCustomers_Selecting(control, selectArguments) {
selectArguments.Tag = "City='Jakarta'";
}

Client binding settings

<ClientBindingSettings DataSourceType="WcfService" ServiceUrl="WcfService.svc">
<ServiceEvents Selecting="GetCustomers_Selecting" />
<ServiceMethods SelectMethod="GetCustomers" />
</ClientBindingSettings>

Select method definition

public List<Customer> GetCustomers(ISNet.ClientServices.DataSourceSelectArguments selectArguments)
{
//Data selection logic
}


Posted: October 7, 2010 4:28 AM

As informed in this thread, intersoft control have not yet supported MVC2 and VS2010. Here is the attached project, however this project is meant to be run on VS2008.

Posted: October 7, 2010 4:23 AM

I have consulted this issue with he developer, unfortunately it seems Intersoft control has not support MVC2 and VS2010.

The blog article is meant for MVC1 and Visual Studio 2008 and the attached project is created using VS2008.

Curerntly, support for MVC2 is being investigated by our developer.

Posted: October 6, 2010 10:19 PM

I am very sorry about the attachment, however in this thread you mention the attached MVC project could not be run sucessfully. For the current thread attachment, I am also using the same project template with the sample in that thread so I will try to replicate the issue before sending you a project that can not be run.

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