Take a look at mvccontrib as well as telerik mvc. I've used both and like both. Telerik is based on jquery, easy to use, and easily customizable.
-----Mensaje original-----
De: sharp-arc...@googlegroups.com
[mailto:sharp-arc...@googlegroups.com] En nombre de sigusr
Enviado el: viernes, 11 de marzo de 2011 01:30 p.m.
Para: S#arp Architecture
Asunto: Re: Best practises for integrating with
You need to implement the (linq) specification pattern and translate the telerik filter to that.
This is a sample, from an Animals Grid...
VIEW:
<div id="gridRegion">
<% Html.Telerik().Grid<ActiveAnimalRow>()
.Name("ActiveAnimalGrid")
.DataBinding(dataBinding => dataBinding
//Ajax binding
.Ajax()
//The action method which will return JSON
.Select("ActiveGrid", "Animals", new { dairyId =
Model.CurrentDairy })
)
.Columns(colums =>
{
colums.Bound(b => b.Identification)
.Title("RP")
.ClientTemplate("<#= IdentificationTemplate #>")
.Width(5)
.Filterable(true);
})
.Pageable(pager => pager.PageSize(20))
.Sortable()
.Selectable()
.Filterable()
.Render();
%>
</div>
CONTROLLER (AnimalsController):
[GridAction]
public ActionResult ActiveGrid(int dairyId)
{
var animals = this.dairyAnimalService.GetActiveAnimals(dairyId,
DateTime.Now);
var rows = GetRows<ActiveAnimalRow>(animals);
// retorno la vista
return View(new GridModel(rows));
}
-----Mensaje original-----
De: sharp-arc...@googlegroups.com
[mailto:sharp-arc...@googlegroups.com] En nombre de sigusr
Enviado el: viernes, 11 de marzo de 2011 02:02 p.m.
Alex and Lucas, thanks. I understand the client binding and
var query = (from e in Session.Linq<MyEntity> select e).AsQueryable();
return query.Skip((Page - 1) * PageSize).Take(PageSize).ToList();
Ryan,
I'm using filtering and sorting as well. Everything is coming over in the grid command. I am using a very early release of telerik.
Alec
I found a problem on SharpArch 1.6 on wcfsessionStorage..
Here is my problem:
On WebSessionStorage
When a request Ends.. This happens
private void Application_EndRequest(object sender, EventArgs
e)
{
NHibernateSession.CloseAllSessions();
HttpContext context = HttpContext.Current;
context.Items.Remove(HttpContextSessionStorageKey);
}
So in new Request new SimpleSessionStorage() comes
On WcfSessionStorage
the session is closed at: DispatchMessageInspector
public void BeforeSendReply(ref Message reply, object
correlationState)
{
NHibernateSession.CloseAllSessions();
}
THE Session is simply closed, not Cleaned its StorageManager. So when a new
request comes, returns the session closed.
Anybody experimente the same problem?
I cannot use a wcf proxy client twice....
For now my simple solution is the next:
In class SessionInstanceExtension. change this
public ISession GetSessionForKey(string factoryKey)
{
//return storage.GetSessionForKey(factoryKey);
var session = storage.GetSessionForKey(factoryKey);
if (session != null && session.IsOpen == false)
{
storage.SetSessionForKey(factoryKey, null);
session = null;
}
return session;
Thanks!
--
You received this message because you are subscribed to the Google Groups "S#arp Architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharp-architect...@googlegroups.com.
To post to this group, send email to sharp-arc...@googlegroups.com.
Visit this group at http://groups.google.com/group/sharp-architecture.
For more options, visit https://groups.google.com/groups/opt_out.