Posts

javascript - Refreshing KendoUI Grid - pager broken -

i have created simple kendo ui grid paging. want refresh grid new data. im using setdatasource attach new data grid , refresh refresh grid. works fine except pager stops working. give me no-items-in-the-grid message. i created jsfiddle demonstrate mean: http://jsfiddle.net/dxgyu/ and here code use refresh grid: var grid = $("#grid").data("kendogrid"); var ds = setds(); grid.setdatasource(ds); grid.refresh(); in example wont changing data doesn't matter. if click button not refresh pager correct way , have no clue how pager update too. can me! it's small can't find anywhere how access grid pager. thanks in advance. the grid's .setdatasource() function expects actual kendo.data.datasource not object. change .setds() function return datasource: function setds() { return new kendo.data.datasource({ ... }); }

asp.net - Can you please tell me why I am getting `The GridView 'GridView1' fired event RowUpdating which wasn't handled.` error message -

i have been able work through initial problem of not being able insert records consistently new error message crops up. now, getting the gridview 'gridview1' fired event rowupdating wasn't handled. this error occurs when click update button update row of record. first, click edit button. exposes update/cancel buttons. when click update button, aforementioned error. my first take gridview needed onrowupdating after adding (see markup code), still getting same error. this bit frustrating. here code. protected sub gridview1_rowupdating(byval sender object, byval e gridviewupdateeventargs) dim dd dropdownlist = directcast(gridview1.rows(e.rowindex).findcontrol("ddlstatus"), dropdownlist) e.newvalues("status") = dd.selecteditem.text end sub markup: <asp:gridview id="gridview1" runat="server" datasourceid="sqldatasource1" autogeneratecolumns="false" datakeynames="reqnu...

android - declaring mime type for a "custom file" that is to be sent via bluetooth -

i need in solving issue: i developing application transfer file application other phone using blue-tooth. when wanted transfer image file, part of code went follows: intent.settype("image/*"); i.putextra(i.extra_stream, uri); //here uri has uri of image want send. and android manifest file went follows: <intent-filter> <action android:name="android.intent.action.main" <category android:name="android.intent.category.launcher" /> <category android:name="android.intent.category.browsable" /> <data android:scheme="file" /> <data android:mimetype="image/*" /> <data android:host="*" /> </intent-filter> and code worked fine. question : want send file created following line: f = file.createtempfile("card", ".xcard", getexternalcachedir()); the name of file this: card124342...

c# - What is wrong with this JQuery AJAX code -

i facing problem ajax code. using mvc3 our project. requirement bind dropdown value using ajax when page load. happens when loading page, ajax request send controller , return ajax function , binds exact values in dropdown. (when page refreshed or first time load) not binding retrieved value. rather showing default value. pls see code , suggest me doing wrong. edit: tried use async property false. not @ send controller action method getting data. code $.ajax({ type: "post", contenttype: "application/json; charset=utf-8", url: '@url.action("getuser", "invoices")', data: "{'id':" + json.stringify(currval) + "}", datatype: "json", async: true, success: function (data) { $("#user-" + curr).select2("data", { id: data.value, name: data.text }); $(this).val(data.v...

mysql - Count the no of id if it is not present in another table based on condition using sql -

i have table consists of repid , date. table: 1 repid date 108981 2013-04-09 00:00:00.000 108981 2013-04-09 00:00:00.000 108982 2013-04-10 00:00:00.000 108982 2013-04-11 00:00:00.000 108983 2013-04-11 00:00:00.000 108983 2013-04-11 00:00:00.000 i have table consists of repid , logtime. table: 2 repid logtime 108981 2013-04-09 00:00:00.000 108981 2013-04-09 00:00:00.000 108982 2013-04-11 00:00:00.000 108983 2013-04-11 00:00:00.000 108983 2013-04-11 00:00:00.000 108984 2013-04-10 00:00:00.000 i want count of repid table 1, when logtime not exist rep table 2. in case need output as repid repcount 108982 1 as date '2013-04-10 00:00:00.000' not exists in table 2 repid - 108982. i have used query as select t1.repid, count(t1.repid) 'rep count' table1 t1 not exists (select t2.repid table2 t2 convert(date, t2.logtime) between '2013-04-08 00:00:00.000' , '2013-04-11 00:00:00.000') group ...

ruby on rails - Difference between flash.now and @instance_var -

i'm wondering difference between using flash.now , using instance variable (e.g. @error_message )? on related note, how flash work when have multiple servers running, , there's probability subsequent request executed different server? i'm wondering difference between using flash.now , using instance variable (e.g. @error_message)? effectively not difference since both values gone after request completes. think it's more of convenience view code can check 1 place error messages instead of having check both flash , instance variable. on related note, how flash work when have multiple servers running, , there's probability subsequent request executed different server? the flash lives in session, typically persisted database. if have multiple instances of rails app running , using same database, have shared access flash object. it's therefore not problem @ if server writes flash object , server b reads out on next request. ...

xtext - Including a grammar into another grammar -

i reuse grammar definitions. i have grammar this: person: 'contact' name=id '{' 'phone' phone=int '}' ; i have grammar this: include "uri/to/other/project/to/other/grammar/definitions" call: 'call' person=person ; person not known second grammar. xtext therefore able insert or include person definition first grammar second grammar? a further step generation of person . know how accomplish too. i found solution. can use keyword "with" used include terminals. the necessary steps: create xtext project com.mydsl.a (a) , com.mydsl.b (b) write grammar a add dependency in meta-inf/manifest of b add a.ui dependency in meta-inf/manifest of b.ui add registration of a's genmodel in b's workflow that: in standalonesetup: registergenmodelfile = "platform:/resource/a/src-gen/path/to/a.genmodel" change first line of b grammar b a you can use eclasses of while writing grammar ...