Search Results

Search found 24399 results on 976 pages for 'datatable select'.

Page 3/976 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Jquery .select function for selecting inside of select menus

    - by Jeff
    I have a select menu with two options that are settings for my website. Instead of having a save button, I want it to save to the db when the new value is selected. Right now I have setup a .click function in my jquery file that achieves this purpose for the most part. The only problem is that if you click the drop down arrow (like click down and then back up) it counts that as a click and begins saving to the db. Is there a way I can make it so that it begins saving only when one of the options in the select menu is selected? or maybe even if only a different value is selected? Any help is greatly appreciated! Thanks

    Read the article

  • Select in PL-SQL Errors: INTO After Select

    - by levi
    I've the following query in a test script window declare -- Local variables here p_StartDate date := to_date('10/15/2012'); p_EndDate date := to_date('10/16/2012'); p_ClientID integer := 000192; begin -- Test statements here select d.r "R", e.amount "Amount", e.inv_da "InvoiceData", e.product "ProductId", d.system_time "Date", d.action_code "Status", e.term_rrn "IRRN", d.commiount "Commission", 0 "CardStatus" from docs d inner join ext_inv e on d.id = e.or_document inner join term t on t.id = d.term_id where d.system_time >= p_StartDate and d.system_time <= p_EndDate and e.need_r = 1 and t.term_gr_id = p_ClientID; end Here is the error: ORA-06550: line 9, column 3: PLS-00428: an INTO clause is expected in this SELECT statement I've been using T-SQL for a long time and I'm new to pl-sql What's wrong here?

    Read the article

  • Page expired issue with back button and wicket SortableDataProvider and DataTable

    - by David
    Hi, I've got an issue with SortableDataProvider and DataTable in wicket. I've defined my DataTable as such: IColumn<Column>[] columns = new IColumn[9]; //column values are mapped to the private attributes listed in ColumnImpl.java columns[0] = new PropertyColumn(new Model("#"), "columnPosition", "columnPosition"); columns[1] = new PropertyColumn(new Model("Description"), "description"); columns[2] = new PropertyColumn(new Model("Type"), "dataType", "dataType"); Adding it to the table: DataTable<Column> dataTable = new DataTable<Column>("columnsTable", columns, provider, maxRowsPerPage) { @Override protected Item<Column> newRowItem(String id, int index, IModel<Column> model) { return new OddEvenItem<Column>(id, index, model); } }; My data provider: public class ColumnSortableDataProvider extends SortableDataProvider<Column> { private static final long serialVersionUID = 1L; private List list = null; public ColumnSortableDataProvider(Table table, String sortProperty) { this.list = Arrays.asList(table.getColumns().toArray(new Column[0])); setSort(sortProperty, true); } public ColumnSortableDataProvider(List list, String sortProperty) { this.list = list; setSort(sortProperty, true); } @Override public Iterator iterator(int first, int count) { /* first - first row of data count - minimum number of elements to retrieve So this method returns an iterator capable of iterating over {first, first+count} items */ Iterator iterator = null; try { if(getSort() != null) { Collections.sort(list, new Comparator() { private static final long serialVersionUID = 1L; @Override public int compare(Column c1, Column c2) { int result=1; PropertyModel<Comparable> model1= new PropertyModel<Comparable>(c1, getSort().getProperty()); PropertyModel<Comparable> model2= new PropertyModel<Comparable>(c2, getSort().getProperty()); if(model1.getObject() == null && model2.getObject() == null) result = 0; else if(model1.getObject() == null) result = 1; else if(model2.getObject() == null) result = -1; else result = ((Comparable)model1.getObject()).compareTo(model2.getObject()); result = getSort().isAscending() ? result : -result; return result; } }); } if (list.size() (first+count)) iterator = list.subList(first, first+count).iterator(); else iterator = list.iterator(); } catch (Exception e) { e.printStackTrace(); } return iterator; } The problem is the following: - I click a column header to sort by that column. - I navigate to a different page - I click Back (or Forward if I do the opposite scenario) - Page has expired. It'd be nice to generate the page using PageParameters but I somehow need to intercept the sort event to do so. Any pointers would be greatly appreciated. Thanks a ton!! David

    Read the article

  • YUI DataTable - Howto have just one paginator?

    - by Rollo Tomazzi
    Hello, I'm using the YUI DataTable in a Grails 1.1 project using the Grails UI plugin 1.0.2 (YUI being 2.6.1). By default, the DataTable displays 2 paginators: one above and another one below the table. Looking up the YUI API documentation, I could see that I can pass an array of YUI containers as a config parameter but - what are the names of these containers? I've tried loooking at the HTML of the page using Firebug. The ID of the divs containing the paginators are: yui-dt0-paginator0 (above) and yui-dt0-paginator1 (below). If I use them to configure the containers for the navigator, then the navigator is just not displayed at all. Here's the relevant extract of the GSP page containing the Datatable element. <div class="body"> <h1>This is the List of Control Accounts</h1> <g:if test="${flash.message}"> <div class="message">${flash.message}</div> </g:if> <div class="yui-skin-sam"> <gui:dataTable controller="controlAccount" action="enhancedListDataTableJSON" columnDefs="[ [key:'id', label:'ID'], [key:'col1', label:'Col 1', sortable: true, resizeable: true], [key:'col2', label:'Col 2', sortable: true, resizeable: true] ]" sortedBy="col1" rowsPerPage="20" paginatorConfig="[ template:'{PreviousPageLink} {PageLinks} {NextPageLink} {CurrentPageReport}', pageReportTemplate:'{totalRecords} total accounts', alwaysVisible:true, containers:'yui-dt0-paginator1' ]" rowExpansion="true" /> </div> </div> Any help? Thanks! Rollo

    Read the article

  • Javascript Error with DataTable jQuery plugin

    - by stevoyoung
    I am getting a JS error and what to know what it means and how to solve it. (JS noob here) Error: "tId is not defined" Line of JS with error: "if (s[i].sInstance = tId) { " More Information I am using the Data Table (http://datatables.net) jQuery plugin. I have a two tables with a class of "dataTable" loaded on a page (inside of jQuery UI tabs). The tables render as expected but I get the error above in Firebug. Attached is my Data Table config file... $(document).ready(function() { //Take from: http://datatables.net/forums/comments.php?DiscussionID=1507 // before creating a table, make sure it is not already created. // And if it is, then remove old version before new one is created var currTable = $(".dataTable"); if (currTable) { // contains the dataTables master records var s = $(document).dataTableSettings; if (s != 'undefined') { var len = s.length; for (var i=0; i < len; i++) { // if already exists, remove from the array if (s[i].sInstance = tId) { s.splice(i,1); } } } } oTable = $('.dataTable').dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers", "bFilter": false }); }); What does the error mean and how do I resolve it?

    Read the article

  • Use jQuery's dataTable plugin with a nested Ajax call

    - by mrr0ng
    I am trying to use a nested ajax call to populate a table, and once the table is built, use jQuery's dataTable plugin to pretty it up. The problem I am running into is an order of operations question. When do I call the dataTable function so that I can be assured that the table is built AFTER the values are populated? When I try the following code, the dataTable is created before the rows are built. <script type="text/javascript"> $(document).ready(function() { $.ajax({ url:"http://totalrockregistration.com/feeds/bands.php", dataType:"jsonp", success: function(jsonData){ $.each(jsonData.bands, function(i,bands){ if (bands.barID == "<?php echo $_GET["barID"]; ?>"){ var songIdFromBandJson = bands.song; var bandNameFromJson = bands.name; var bandScoreFromJson = bands.score; $.ajax({ url:"http://totalrockregistration.com/feeds/songs.php", dataType:"jsonp", success: function(songsJsonData){ $.each(songsJsonData.songs, function(i,songs){ if (songIdFromBandJson == songs.id){ var songName=(songs.name); $("#leaderBoardTable tbody").append("<tr><td>"+bandNameFromJson+"</td><td>"+bandScoreFromJson+"</td><td>"+songName+"</td></tr>"); } }); } }); } }); makeLeaderTable(); }, }); function makeLeaderTable(){ $('#leaderBoardTable').dataTable({ "aaSorting": [[ 1, "desc" ]], "iDisplayLength": 50 }); } }); </script>

    Read the article

  • Grails YUI- Datatable complete refresh

    - by geeronimo
    Hi, I have inserted a paginator for my YUI-Datatable. Now I want to refresh my whole page, when the user has changed the view in my Datatable. YUI makes just a refresh (remoteCall) for itself, but I need a refresh for the whole page, because I want to update my Flashanimation too. For any sugest I would be very grateful, Geeron imo Here´s the code for my datatable: paginatorConfig="[ template:'{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {CurrentPageReport}', pageReportTemplate : '{startRecord} - {endRecord} von {totalRecords}', containers:'dt-paginator', firstPageLinkLabel: '&lt;&lt;', lastPageLinkLabel: '&gt;&gt;', previousPageLinkLabel: '&lt;', nextPageLinkLabel: '&gt;' ]" />

    Read the article

  • Remove duplicates from DataTable and custom IEqualityComparer<DataRow>

    - by abatishchev
    How have I to implement IEqualityComparer<DataRow> to remove duplicates rows from a DataTable with next structure: ID primary key, col_1, col_2, col_3, col_4 The default comparer doesn't work because each row has it's own, unique primary key. How to implement IEqualityComparer<DataRow> that will skip primary key and compare only data remained. I have something like this: public class DataRowComparer : IEqualityComparer<DataRow> { public bool Equals(DataRow x, DataRow y) { return x.ItemArray.Except(new object[] { x[x.Table.PrimaryKey[0].ColumnName] }) == y.ItemArray.Except(new object[] { y[y.Table.PrimaryKey[0].ColumnName] }); } public int GetHashCode(DataRow obj) { return obj.ToString().GetHashCode(); } } and public static DataTable RemoveDuplicates(this DataTable table) { return (table.Rows.Count > 0) ? table.AsEnumerable().Distinct(new DataRowComparer()).CopyToDataTable() : table; } but it calls only GetHashCode() and doesn't call Equals()

    Read the article

  • Add columns to a datatable in c#?

    - by Pandiya Chendur
    I have a csv reader class that reads a .csv file and its values.... I have created datatable out of it... Consider my Datatable contains three header columns Name,EmailId,PhoneNo.... The values have been added successfully.... Now i want to add two columns IsDeleted,CreatedDate to this datatable... I have tried this but it doesn't seem to work, foreach (string strHeader in headers) { dt.Columns.Add(strHeader); } string[] data; while ((data = reader.GetCSVLine()) != null) { dt.Rows.Add(data); } dt.Columns.Add("IsDeleted", typeof(byte)); dt.Columns.Add(new DataColumn("CreatedDate", typeof(DateTime))); foreach (DataRow dr in dt.Rows) { dr["IsDeleted"] = Convert.ToByte(0); dr["CreatedDate"] = Convert.ToDateTime(System.DateTime.Now.ToString()); dt.Rows.Add(dr); } When i try to add isdeleted values an error saying This row already belongs to this table. ....

    Read the article

  • DataTable to Object collection

    - by Kenneth Cochran
    I'm working on a data import feature and I've been able to load an excel sheet into a DataTable using Ado.NET with the MSJet db engine. I created a simple one-to-one mapping dialog, in which the user drags column headings from their spreadsheet to a list of object properties. What's stumping me is how to turn each DataRow into a business object. Is there an easy way to do this? If there is a better way than using a DataTable as a middleman I'm open to suggestion? I use NHibernate extensively through out the rest of my program but I couldn't find any attempts to map to an excel spreadsheet. I went with a DataTable because the technique was well documented.

    Read the article

  • Call click event on last clicked row in YUI datatable

    - by Javi
    Hello, I have a YUI datatable and I have a function which is invoked when I click on a row: ... YAHOO.keycoes.myDatatable = myDatatable; ... myDatatable.subscribe("rowClickEvent", oneventclickrow); var oneventclickrow = function( args ) { ... } I'd like to invoke the function subscribed to rowClickEvent on the row which is currently highlighted in the datatable (the row which was clicked for the last time). I've tried to do something like this: YAHOO.keycoes.myDatatable.getSelectedRows()[0].rowClickEvent() but getSelectedRows() doesn't return any row. How can I get the highlighted row in the datatable and then call the function associated with rowClickEvent? Thanks

    Read the article

  • DataTable C# Empty column type

    - by Dested
    I am trying build a DataTable one row at a time using the following code. foreach (var e in Project.ProjectElements[hi.FakeName].Root.Elements()) { index = 0; object[] obj=new object[count]; foreach (var holdingColumn in names) { string d = e.Attribute(holdingColumn.Key).Value; obj[index++] = d; } dt.Rows.Add(obj); } The problem is the DataTable has types tied to the columns. Sometimes im passing null (or an empty string) in that object index and it is telling me that it cant be converted properly to a DateTime (in this case). My question is what should I default this value to, or is there some way to have the DataTable ignore empty values.

    Read the article

  • System.IndexOutOfRange Exception Sending Gridview Values to DataTable

    - by SidC
    Hello, I am writing an ASP.NET 3.5 application and need to send gridview values to a datatable for use in a listbox control as part of a quote process. I have written the following VB code in my Page_Load: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim dtSelParts As DataTable = New DataTable("dtSelParts") Dim column As DataColumn = New DataColumn column.ColumnName = "PartName" column.ColumnName = "PartNumber" column.ColumnName = "Quantity" dtSelParts.Columns.Add(column) For Each row As GridViewRow In MySearch.Rows Dim drSelParts As DataRow drSelParts = dtSelParts.NewRow() For i As Integer = 0 To row.Cells.Count - 1 drSelParts(i) = row.Cells(i).Text Next Next End Sub When I run the partsearch.aspx page, I enter values in the row textbox for parts I want included in the listbox (to be included in quote). However, I receive the error message System.Index.OutOfRangeException: Cannot find column 1 which occurs on the line drSelParts(i) = row.Cells(i).Text. How might I correct the code and resolve the error? Thanks, Sid

    Read the article

  • DataTable Delete Row and AcceptChanges

    - by Pang
    DataTable DT num type name =================================== 001 A Peter 002 A Sam 003 B John public static void fun1(ref DataTable DT, String TargetType) { for (int i = 0; i < DT.Rows.Count; i++) { string type = DT.Rows[i]["type"]; if (type == TargetType) { /**Do Something**/ DT.Rows[i].Delete(); } } DT.AcceptChanges(); } My function get specific data rows in datatable according to the TargetType and use their info to do something. After the datarow is read (match the target type), it will be deleted. However, the row is deleted immediately after .Delete() execute, so the location of the next row (by i) is incorrect. For example, if TargetType is A. When i=0, the "Peter" row is deleted after .Delete executed. Then when i=1, I suppose it will locate the "Sam" row but it actually located "John" row because "Peter" row is deleted. Is there any problem in my codes?

    Read the article

  • YUI Datatable Not Taking JSON

    - by Pete Herbert Penito
    I am trying to fill a Datatable with a JSON using YUI, I have this JSON: [{"test":"value1", "test2":"value2", "test3":"value3", "topic_id":"123139007E57", "gmt_timestamp":1553994442, "timestamp_diff":-1292784933382, "status":"images\/statusUp.png", "device_id":"568FDE9CC7275FA"}, .. It continues like this with about 20 different devices, and I close it with a ] I just want to print select keys in the datatable so my Column Definitions look like this: var myColumnDefs = [ {key:"test", sortable:true, resizeable:true}, {key:"test2", sortable:true, resizeable:true}, {key:"topic_id", sortable:true, resizeable:true}, {key:"status", sortable:true, resizeable:true}, {key:"device_id", sortable:true, resizeable:true}, ]; var myDataSource = new YAHOO.util.DataSource(bookorders); myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; myDataSource.responseSchema = { fields: ["test","test2","topic_id","status","device_id"] }; var myDataTable = new YAHOO.widget.DataTable("basic", myColumnDefs, myDataSource); It's print Data Error for some reason, what am I doing wrong? Thanks! I have tested the validity of the JSON at JSONLint and it says it is valid.

    Read the article

  • How to view a DataTable while debuging

    - by Eric
    I'm just getting started using ADO.NET and DataSets and DataTables. One problem I'm having is it seems pretty hard to tell what values are in the data table when trying to debug. What are some of the easiest ways of quickly seeing what values have been saved in a DataTable? Is there someway to see the contents in Visual Studio while debugging or is the only option to write the data out to a file? I've created a little utility function that will write a DataTable out to a CSV file. Yet the the resulting CSV file created was cut off. About 3 lines from what should have been the last line in the middle of writing out a System.Guid the file just stops. I can't tell if this is an issue with my CSV conversion method, or the original population of the DataTable. Update Forget the last part I just forgot to flush my stream writer.

    Read the article

  • Sorting records datewise in datatable.

    - by Harikrishna
    I have datatable and I am storing the records in that datatable. Now one of the column in the datatable is type of DateTime.That column I added by code Table.Columns.Add(new DataColumn("TradingDate",System.Type.GetType("System.DateTime"))); Now I want to sort the records datewise in ascending order. I have used following code but the records are not sorted. DataView view = new DataView(Table); view.Sort = "TradingDate ASC"; dataGridView1.DataSource=view.Table; But records are not sorted so how to do it ?

    Read the article

  • .NET Garbage Collection behavior (with DataTable)

    - by gmac
    I am wonder why after creating a very simple DataTable and then setting it to null why Garbage Collection does not clear out all the memory used by that DataTable. Here is an example. The variable Before should be equal to Removed but it is not. { long Before = 0, After = 0, Removed = 0, Collected = 0; Before = GC.GetTotalMemory(true); DataTable dt = GetSomeDataTableFromSql(); After = GC.GetTotalMemory(true); dt = null; Removed = GC.GetTotalMemory(true); GC.Collect(); Collected = GC.GetTotalMemory(true); } Gives the following results. Before = 388116 After = 731248 Removed = 530176 Collected = 530176

    Read the article

  • DataTable won't DataBind with a DataTable.NewRow()

    - by David
    Is DataRow.NewRow() insufficient as the only row in a DataTable? I would expect this to work, but it doesn't. It's near the end of my Page_Load inside my If(!Postback) block. gridCPCP is GridView DataTable dt = new DataTable(); dt.Columns.Add("ID", int.MinValue.GetType()); dt.Columns.Add("Code", string.Empty.GetType()); dt.Columns.Add("Date", DateTime.MinValue.GetType()); dt.Columns.Add("Date2", DateTime.MinValue.GetType()); dt.Columns.Add("Filename", string.Empty.GetType()); //code to add rows if (dt.Rows.Count > 0) { gridCPCP.DataSource = dt; gridCPCP.DataBind(); } else { dt.Rows.Add(dt.NewRow()); gridCPCP.DataSource = dt; gridCPCP.DataBind(); //EXCEPTION int TotalColumns = gridCPCP.Rows[0].Cells.Count; gridCPCP.Rows[0].Cells.Clear(); gridCPCP.Rows[0].Cells.Add(new TableCell()); gridCPCP.Rows[0].Cells[0].ColumnSpan = TotalColumns; gridCPCP.Rows[0].Cells[0].Text = "No Record Found"; } The exception throws on gridCPCP.DataBind() and only when execution reaches the else block. If there were rows added above via dt.Rows.Add(new object[] { ... } binding works. System.ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: length

    Read the article

  • a4j:jsFunction with actionListener inside of h:dataTable

    - by JQueryNeeded
    Hello all, I'm having problem with using a4j:jsFunction with actionListener inside of h:dataTable, when I want to invoke an action over particular row with a4j:commandLink it works flawless but when I want to invoke the action with a4j:jsFunction & actionListener it's always invoked over the last element in dataTable Let me give you an example: <a4j:form ajaxSubmit="true" reRender="mainForm" id="mainForm"> <a4j:region> <t:saveState value="#{ts.list}" /> </a4j:region> <h:dataTable value="#{ts.list}" var="el" binding="#{ts.bind}"> <h:column>#{el}</h:column>> <h:column> <a4j:commandLink actionListener="#{ts.rem}"> <h:outputText value="delete by CMDLink" /> </a4j:commandLink> </h:column> <h:column> <a href="#" onclick="okClicked();">delete by okClicked</a> <a4j:jsFunction name="okClicked" actionListener="#{ts.rem}" /> </h:column> </h:dataTable> </a4j:form> now, the bean's code: package com.sth; import java.util.ArrayList; import java.util.List; import javax.faces.component.UIData; import javax.faces.event.ActionEvent; public class Ts { private List<String> list = new ArrayList<String>(); private UIData bind; public Ts(){ list.add("element1"); list.add("element2"); list.add("element3"); list.add("element4"); } public List<String> getList() { return list; } public void setList(List<String> list) { this.list = list; } public void rem(ActionEvent ae) { String toRem = (String) bind.getRowData(); System.out.println("Deleting " + toRem); list.remove(toRem); } public UIData getBind() { return bind; } public void setBind(UIData bind) { this.bind = bind; } } when I use a4j:commandLink to remove element, it works as its expected, but when I use a4j:jsFunction to invoke actionListener it invokes action against last element :( Any ideas? Cheers

    Read the article

  • JQuery Datatable filter css

    - by Bugzy bug
    Hey guys, I have a really dumb question if you don't mind me to ask :( the thing is that I would like to customise the filter in my datatable to the search field similar to stackoverflow's but i've been struggling so much recently so not sure if i can do it. my datatable looks like the one from the example in the link below: link text Thanks for the help!

    Read the article

  • How to use linkbuttons within yui datatable?

    - by Pandiya Chendur
    I use yui datatable and i have a field which is resumePath which is path to a file in a folder in my application... So how to use linkbutton and show my path on it... { key: "resumepath", label: "Resumepath", width: 250, formatter: YAHOO.widget.DataTable.formatLink } and this doesnt work any suggestion... I want to make this file to downloaded when the user clicks on it..

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >