Culture:
User Id: Password:

Syrinx, Inc.

From .NET Training to Enterprise Architectures

 

Unable to get the Nitobi library to work

Pages:  [1]
Jun 25, 09 -7:12 PM
Hi,I'm trying out your library but having major trouble getting even the basic example working.Using the simple grid as a start I created a new project with a single page, which contains:    <ntb:Grid ID="g" runat="server" Width="347" Height="300" Mode="LocalNonPaging" AllowAddRow="true" AllowDeleteRow="true">        <Columns>            <ntb:BoundColumn DataField="Id" Width="30" />            <ntb:BoundColumn HeaderText="First Name" DataField="FirstName" Width="150" ReadOnly="false" />            <ntb:BoundColumn HeaderText="Last Name" DataField="LastName" Width="150" ReadOnly="false" />        </Columns>    </ntb:Grid> The back end code is:    protected void Page_Load(object sender, EventArgs e)    {        if (Session["customers"] == null)          {               ArrayList l = new ArrayList();               l.Add(new Customer("0", "John", "Smith"));               l.Add(new Customer("1", "Mark", "Aldrin"));               l.Add(new Customer("2", "Matthew", "Jones"));               l.Add(new Customer("3", "Luke", "Kettle"));               Session["customers"] = l;           }        g.Data.provider().GetData += new Nitobi.GetDataHandler(SimpleDataGrid_GetData);    }    object SimpleDataGrid_GetData(HttpRequest request, Nitobi.AjaxGetDataHandlerEventArgs args)    {        return Session["customers"];    }(Customer class is also defined). But when running this page I only get a "loading" message along witht he Javascript error of:Error: url is nullSource File: http://test/WebResource.axd?d=qoxvb15FjRiXTU9iLEbqnrDrr4-wzx7Nfn83MQ44VNWGUwp3hb4ltpKHWkzpsj4WiL6y1KieXUDWdaxvESWwxA2&t=633813643775427235Line: 1086 Where the error line is in the Nitobi JS file: var href=(url.match(/.*\//)||"")+""; Am I missing something obvious here? Thanks. Dan  
dan_jf
Joined: Jun 25, 09
Jun 30, 09 -9:16 AM

I bet you are using the included, but out of date, VS2005 project.  I'm sorry to say that the download available online has a VS2005 project that is out of date.  We kind of got lazy an donly kep the VS2008 project current (because we use VS2008 ).  Try using the VS2008 project if thats whats going on.  If you're still using VS2005, you'll need to add all the .cs files into the project to get it to compile properly.

 

Matt

matt
Joined: Dec 12, 08
Pages:  [1]

Syrinx.ph © 2007 - 2010
All other company names, logos and trademarks appearing in this website are the property of their respective owners.
Powered by Syrinx CS