w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to Apply mouse and Touch Swipe on data-role="footer" ,the footer which is used for loading data dynamically?
Finally i got the answer of these In HTML5:- <div data-role="page" data-theme="b" id="jqm-home"> <div data-role="footer" data-position="fixed" data-theme="c"> <div class="categories" id="cat"> <ul id="cat_list" class="cat_list_class"></ul> </div> </div> In jquery:- var step = 1; var current = 0; var maximum = 0; var visible = 2; var speed = 500; var liSize = 120; var height = 60; var ulSize = liSize * maximum; var divSize = liSize * visible; $(document).unbind('pageinit').bind('pageinit', function () { callMenuConnection(); $('.categories').css("width", "auto").css("height", height+"px").css("visibility", "visible").css("overflow", "hidden").c

Categories : Android

How can I have gridview showing a different value than its data source?
You can create a new column and set the Property "UnboundType" to object. In the "CustomUnboundColumnData" event you can fill this. So you dont have any link to your datasource. Here is small example: http://www.devexpress.com/Support/Center/Example/Details/E3354

Categories : C#

ASP.net Array List as a data source for Gridview
Hiding a column: are you using autogenerate columns? or did you add your own columns to the grid? Change the column header text: open the grid columns editor (the little > icon on the upper right corner when you select the gridview) Add a command column from the grid columns editor (step 2 above) HTH Jafar

Categories : C#

Enable Page Indexing on GridView with List as its Data Source
You can use following code: public class SearchResults { public string fname { get; set; } public string mname { get; set; } public string lname { get; set; } } set your markup like this in .aspx page: <asp:GridView runat="server" ID="Gridview1" AllowPaging="True" OnPageIndexChanging="PageIndexChanging" PageSize="4"> </asp:GridView> Write following code in your code behind (.aspx.cs) : protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Get list of search and bind data with Grid this.Search(); } } private void Search() { var searchResults = new List<SearchResults>(); var search = new SearchResults { fname = "John" }; searchResults.Add(search);

Categories : List

ASP.NET gridview does not allow me to click on column header texts so I can sort the data
You need to add "SortExpression" in your asp:BoundField. For example : <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />

Categories : C#

Gridview returning empty even when there is data. I want to use data in the gridview to update another database
Per my comment above you may want to do something like: List<string> _OrderIds = new List<string>(); DataTable table = gvOrderLines.DataSource as DataTable; foreach (GridViewRow gvr in table.Rows) { Label myOrderIDLablel = (Label)gvr.FindControl("lblOrderID"); //find control since it is a template field _OrderIds.Add(myOrderIDLablel.Text); } I hope this get you headed in the right direction.

Categories : C#

display gridview data in another page or other gridview with row data in editable mode
You need to add RowCommand Event in GridView. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand"> <asp:LinkButton ID ="lnkEdit" runat ="server" CommandArgument='<%#Eval("Recordid")%>' CommandName ="cmdEdit" Text ='Edit'></asp:LinkButton> </asp:GridView> Here rocordid is the id of your record. In Page behind you need to write code. protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "cmdEdit") { string Recordid = Convert.ToString(e.CommandArgument.ToString()); Response.Redirect("EditPage.aspx?recordid="+Recordid ); } } On EditPage you can get recordid from the query string and can fetch the record form the datab

Categories : Asp Net

How to Hide and Show Header and Footer Toolbar on Pageshow
give the header and footer CSS classes that contain the declaration "display: none", and use an javascript touch event handler bound to window to show them by removing that class. Also note that data-role="header" is a bit silly, since html has a element for this. Secondarily, note that you've given both id=footer which is guaranteed to cause problems. <header class="hidden" ...>...</header> ... <footer class="hidden" ...>...</footer> + <script> function enableHeaderFooter() { $(document).off("touchend", enableHeaderFooter); $("header, footer").removeClass("hidden"); } $(document).on("touchend", enableHeaderFooter); </script>

Categories : Javascript

Insert strings from data table to gridview and show them as links
You looking for HyperLinkField in gridview <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns ="false"> <Columns> <asp:hyperlinkfield datatextfield="Name" datanavigateurlfields="Url" datanavigateurlformatstring="{0}" headertext="Url" target="_blank" /> </Columns> </asp:GridView>

Categories : C#

Updating statement using Join/coalesce to show data on gridview
Please try following code: SELECT [Theme].[PK_Theme], [Theme].[Name], [ThemeType].[Type] FROM [Theme] LEFT OUTER JOIN [ThemeType] ON [Theme].[ThemeTypeId] = [ThemeType].[PK_ThemeType] JOIN [ProductTheme] ON [ProductTheme].[ThemeId]=[Theme].[PK_Theme] WHERE ProductTheme.ProductID LIKE @productParam AND ProductTheme.ThemeId = Theme.PK_Theme AND [Theme].[ThemeTypeId] IS NOT NULL AND COALESCE([THEME].[THEMETYPEID], 'null') LIKE @assignedParam GROUP BY [Theme].[Name], [ThemeType].[Type], [Theme].[PK_Theme] ORDER BY CASE WHEN [ThemeType].[Type] IS NULL THEN 0 ELSE 1 END, [Theme].[Name]

Categories : Asp Net

Custom view with data source. When should the data source be queried for the first time?
I had a hunch, but to get an authoritative answer, I used the debugger. I set a break point in -numberOfSectionsInTableView: and -tableView:numberOfRowsInSection:. They are called from -[UITableView reloadData] of course, but also from -[UITableView layoutSubviews]. In the special case of -[UITableViewController tableView], -[UITableViewController viewWillAppear:] calls -numberOfSectionsInTableView: directly (iOS 6.1 simulator).

Categories : IOS

Why does my shared data source become a custom data source when deployed?
Figured it out. I was adding a shared datasource to preexisting reports to cut down on the amount of manual changes when switching servers. However, once a report is deployed, the data source properties in report manager can no longer be changed by visual studio. The solution is to delete the reports from the report server before redeploying them. It'll be forced to get the get whatever is defined in the report definition then.

Categories : Sql Server

how to encrypt the data source password or data source in tomee
The <Resource> in Tomcat has an attribute called factory. Here you specify a datasource factory. For encrypted password you need a custom datasource factory which reads the encrypted password. Here is what you need An encryption/decryption algorithm for password. Custom datasource factory For more details, please check out this very detailed step by step example for achieving the same.

Categories : Java

How to find a Gridview Footer label when there isn't always a footer
You need to check if GridView1.FooterRow is not null first. So it'd look like this: if(GridView1.FooterRow != null && GridView1.FooterRow.FindControl("TotalLbl") != null)

Categories : C#

ASP.Net object reference error when writing data to xml file via Gridview Empty data template
The issue is when you have the xml file without 'po' node. You can move the node to a new method like: Private Function CreatePOSDataset() As DataSet Dim oDs As New DataSet() oDs.DataSetName = "newshipmentnotification" oDs.Tables.Add("pos") oDs.Tables("pos").Columns.Add("pos_Id") oDs.Tables("pos").Columns("pos_Id").ColumnMapping = MappingType.Hidden oDs.Tables.Add("po") oDs.Tables("po").Columns.Add("ponumberID") oDs.Tables("po").Columns.Add("pos_Id") oDs.Tables("po").Columns("pos_Id").ColumnMapping = MappingType.Hidden oDs.Tables("po").Columns.Add("ponumber") Dim pos_po As DataRelation = oDs.Relations.Add("pos_po", oDs.Tables("pos").Columns("pos_Id"), _ oDs.Tables("po").Columns("pos_Id"))

Categories : Asp Net

Export Gridview Data to Excel in ASP.NET Linq data bind
It's pretty easy to set up the excel export that will export only the gridview. This has been tested and will only export the gridview that appears on your given web page. For your C# code use the following: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class vxcel_export : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button2_Click(object sender, EventArgs e) { Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=file-name.xls"); Response.ContentType = "application/vnd.xlsx"; System.IO.StringWriter stringWrite = new System.IO.StringWriter(); Sys

Categories : Asp Net

Convert varchar data to datetime in SQL server when source data is w/o format
DECLARE @var VARCHAR(100) = '20130120161643730' SELECT convert(datetime,(LEFT(@var,8)+' '+SUBSTRING(@var,9,2)+':'+SUBSTRING(@var,11,2)+':'+SUBSTRING(@var,13,2)+':'+RIGHT(@var,3))) The only possible way to convert this type of string to date time is to break it and then convert it to DateTime. Also, Concat doesnt work in MS SQL but "+".

Categories : SQL

The data source does not support server-side data paging when sorting
Your problem is the following line of code: GWCase.DataSource = (e.SortExpression + " " + strSortDirection); This is telling the GridView to bind to something that is not the same type of data source you originally bound the grid to. For example, if the user had selected to sort by clicking the Victim column, then the above code would try to set a string of victim ascending as the data source, which clearly is incorrect. To get quick paging/sorting capabilities into a GridView the easiest way is to use the DataTable data structure, along with a DataView data structure. A previous StackOverflow question details an example of doing this. The question itself details the usage of DataTable and DataView to facilitate the sorting and paging, along with using ViewState to maintain whether th

Categories : C#

wso2 data source server - creating a data layer for a new service
IMO, it depends on where and when this new service is developed and get hosted. If you're a one man shop dealing with one application, there is no difference going down either path. At development time, you know the system in and out, you know where your data access code should be written, what sort of data you're transferring between the DB and the application and where this information is getting used in your application. This is one reason why some people tend not to touch anything with web services even with a ten foot pole. You're introducing additional overhead and complexity and not being able to justify why would you possibly need it. Let's say you work in place where there are multitude of developers involved with developing all sorts of applications which at some point in time

Categories : Misc

Data is not properly stored to hsqldb when using pooled data source by dbcp
Your method of accessing the database from outside your application process is simply wrong. Only one java process is supposed to connect to the file: database. In order to achieve your aim, launch an HSQLDB server within your application, using exactly the same JDBC URL. Then connect to this server from the external client. See the Guide: http://www.hsqldb.org/doc/2.0/guide/listeners-chapt.html#lsc_app_start Update: The OP commented that the external client was used after the application had stopped. Because you have turned the log off with hsqldb.log_data=false, nothing is persisted permanently. You need to perform an explicit CHECKPOINT or SHUTDOWN when your application completes its work. You cannot rely on shutdown=true at all, even without connection pooling. See the Guide: h

Categories : Database

data source does not support server-side data paging
Have you tried using a SqlDataAdapter to fill a DataSet/DataTable with your SQL results? Then use that DataTable as your data source for the GridView. Basic framework for filling your DataTable: public DataTable GetDataTable(String connectionString, String query) { DataTable dataTable = new DataTable(); try { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); using (SqlCommand command = new SqlCommand(query, connection)) { using (SqlDataAdapter dataAdapter = new SqlDataAdapter(command)) { dataAdapter.Fill(dataTable); } } } } catch { } return dataTable; } And then you c

Categories : Asp Net

Slow get data from data gridview into SQL Server
A fast way to insert many records into an SQL Server's table is to use the SqlBulkCopy class. First you will need a function which will copy the content of your DataGridView into a DataTable. Private Function GetDataTable() As DataTable Dim DataTable1 As New DataTable Dim i1, i2, RowsCount1 As Integer For i1 = 0 To DataGridView1.Columns.Count - 1 DataTable1.Columns.Add(DataGridView1.Columns(i1).Name, DataGridView1.Columns(i1).ValueType) Next If DataGridView1.AllowUserToAddRows = True Then RowsCount1 = DataGridView1.Rows.Count - 1 Else RowsCount1 = DataGridView1.Rows.Count End If For i1 = 0 To RowsCount1 - 1 DataTable1.Rows.Add(DataTable1.NewRow) For i2 = 0 To DataGridView1.Columns.Count - 1 DataTabl

Categories : Vb.Net

Create Two Data Table From XML Data Source With Relationship
You can use DataSet that has many DataSet see this: In a DataSet that contains multiple DataTable objects, you can use DataRelation objects to relate one table to another, to navigate through the tables, and to return child or parent rows from a related table.

Categories : C#

Gridview onRowCommand fired gridview no data
Problem in this line ID = gvWorkshop.DataKeys[grdrow.RowIndex]["workshopID"].ToString(); You have mention "grdrow" in place of "row". please change it to ID = gvWorkshop.DataKeys[row.RowIndex]["workshopID"].ToString();

Categories : C#

Bind data from label to SQL data source
Assuming your label is an asp:Label cmd.Parameters.AddWithValue("@Name", YourLabel.Text); If you are referring to pulling a label from a DataList you need to find the control first e.g. var label = dataList.Items[i].FindControl("yourLabel") as Label; cmd.Parameters.AddWithValue("@Name", label.Text); FYI - it's generally not a good idea to couple your data access layer with your view...

Categories : C#

How to insert data into RDF data source in WSO2 DSS
By the looks of it, I feel that the problem is with the SPARQL query itself. Although, I'm aware that the query is syntactically correct and conforms to the SPARQL specifications, I wonder whether the Apache Jena version used in DSS allows you to follow the syntax "INSERT DATA" (just a wild guess analyzing the reported error log). Can you try "INSERT (INTO)" clause and check if it works? Ideally, DSS doesn't do any modifications to the query except input/output mapping processing so if your query format is right it should work out of the box. Cheers, Prabath

Categories : Wso2

TableView not reloading when data is inserted into source from different source
Try this: - (void)reloadDataInTableView:(NSString *)message :(NSString*)sender { NSLog(@"Text: %@ Sender: %@", message, sender); NSMutableDictionary *m = [[NSMutableDictionary alloc] init]; [m setObject:message forKey:@"msg"]; [m setObject:sender forKey:@"sender"]; if (!messages) { messages = [[NSMutableArray alloc] init]; } [messages addObject:m]; [self.tView reloadData]; NSLog(@"Number of rows: %d", [messages count]); }

Categories : IOS

C# Data GridView, large data
Read Efficiently Paging Through Large Amounts of Data for a walkthrough of setting up custom paging with a GridView control. You will need to have a separate query for the total record count, which should be done first. Then you can calculate the number of pages the grid will have in order to build the paging controls. Total record count / records per page = number of pages Note: the records per page may be hard-coded in the GridView markup or you can have a control on your page that allows the user to pick a page size.

Categories : C#

simple if statement to show data or show no data
Based on the limited information you're providing, I'm making a couple of assumptions here: row is a DataRow There exists a DataTable (which I will call table) Sometimes there exists a column named data and sometimes there does not. (That is, your schema is not static.) You can check for the existence of a column on the DataTable object in its Columns collection. Something like this: If table.Columns.Contains("data") Then ' use the column End If So your code might look something like this: If table.Columns.Contains("data") Then For Each row In name4 array3.Add(row("data")) Next row End If It's definitely unorthodox to have a non-static database schema. At the very least that sort of thing should be handled by your database code and not in the application lo

Categories : Vb.Net

How to change tornado post header and add into header new data?
RequestHandler has set_header and add_header methods: http://www.tornadoweb.org/en/stable/web.html#tornado.web.RequestHandler.set_header #!/usr/bin/python # -*- coding: utf-8 -*- import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options define("port", default=8000, help="run on the given port", type=int) class IndexHandler(tornado.web.RequestHandler): def post(self): data = tornado.escape.json_decode(self.request.body) key = data.get('key', None) # result = fetch_data_for(key) result = "ok " self.add_header('validation', 'value') self.write(result) if __name__ == "__main__": tornado.options.parse_command_line() app = tornado.web.Applic

Categories : Python

How can I get a data source's value from a data binding?
I was on the right track, there were just several more steps. This is what I needed: Binding bind = (sender as Control).DataBindings[0]; DataTable table = (bind.DataSource as DataSet).Tables[0]; string table_column_name = bind.BindingMemberInfo.BindingMember; string column_name = table_column_name.Split(new char[] { '.' })[1]; DataColumn column = table.Columns[table.Columns.IndexOf(column_name)]; object data = table.Rows[0][column];

Categories : C#

NSJSONSerialization does not return data, but its showing data in json viewer
Make a NSURLConnection and request the JSON with NSURLRequest because I don't think the 'json' is an actual file that has content so you could use dataWithContentsOfURL:

Categories : Iphone

Want to show a data table populated with data after a button click
You can initialize a simple getter/setter : private boolean visible = false; // getter/setter public void getUserList(ActionEvent event) { setVisible(true); // Your code } And modify your view like this : <p:commandButton value="Go" styleClass="apply_button" actionListener="#{searchBean.getUserList}" update="table-wrapper"> <f:attribute name="trigram" value="#{searchBean.trigram}"/> <f:attribute name="firstName" value="#{searchBean.firstName}"/> <f:attribute name="lastName" value="#{searchBean.lastName}"/> </p:commandButton> <h:panelGroup id="table-wrapper"> <p:dataTable rendered="#{searchBean.visible}" value="#{searchBean.listUser}" var="user"> <p:column headerText="Trigram"> <h:outputTex

Categories : JSF

Sorting data according to data header
In this case your table schemea is wrong.You need to create another table like Payments where you will insert the payments relevant to Student ID. Student_ID | Payments 1 | 1-Jan, 1-Feb, 1-Mar 1 | 1-Feb, 1-Mar and so on..

Categories : PHP

Why are some functions declared extern and header file not included in source in Git source code?
strbuf.c includes cache.h and cache.h includes strbuf.h, so your premise for question 2 (that strbuf.c does not include strbuf.h) is wrong: it does include it, just not directly. extern applied to functions The extern keyword is never required for function declarations, but it does have an effect: it declares that the identifier naming the function (i.e., the function's name) has the same linkage as any previously visible declaration, or if no such declaration is visible, that the identifier has external linkage. This rather confusing phrasing really means that, given: static int foo(void); extern int foo(void); the second declaration of foo also declares it static, giving it internal linkage. If you write: static int foo(void); int foo(void); /* ERROR */ you have declared it fir

Categories : C

How can i add Footer to Gridview
Use a footer template: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.templatefield.footertemplate.aspx The link contains a sample that shows how to add a total field. Basically: <asp:templatefield headertext="Total" itemstyle-horizontalalign="Right" footerstyle-horizontalalign="Right" footerstyle-backcolor="Blue" footerstyle-forecolor="White"> <itemtemplate> <%#Eval("Total", "{0:c}") %> </itemtemplate> <footertemplate> <asp:label id="OrderTotalLabel" runat="server"/> </footertemplate> </asp:templatefield> Along with: void OrderGridView_RowDataBound(Object sender, GridV

Categories : C#

Footer only on last data page in Reportlab
By overriding ReportLabs canvas Class, you CAN keep track of the pages (granted I've done it with other reports that don't involve flowables, but I believe you can still make it work!) . Since you are using a flowable (Paragraph), you need to know how many pages it is going to be with each new PDF generation (the length is the dynamic part). I am not 100% positive, but I think ReportLab's flowable still invoke the "showPage()" method of the canvas. So you can do the following: In pseudo-code/part-python, I'd recommend the following (untested): class MyFooterCanvas(canvas.Canvas): def __init__(self, *args, **kwargs): ## Subclass the ReportLab canvas class. canvas.Canvas.__init__(self, *args, **kwargs) ## Create an empty list to store the saved pages so y

Categories : Misc

Databind to gridview from backend c#, but show the fields only which is mentioned in BoundField of gridview
Set Gridview property AutoGenerateColumns="false" <asp:GridView ID="custdet" AutoGenerateColumns="false" runat="server"> <Columns> <asp:BoundField DataField="CustAccNo" HeaderText ="AccNo" /> <asp:BoundField DataField="Name" HeaderText="Customer Name" /> </Columns> </asp:GridView>

Categories : C#

Bind data to nested grid in footer
You did not set CommandArgument when you crated your button. Button showStaff = new Button(); showStaff.CommandName = "ShowAll"; showStaff.CommandArgument = e.Row.RowIndex.ToString(); showStaff.Text = e.Row.Cells[2].Text.ToString();

Categories : C#

How to show all the data changes since the last commit in Ember data?
If it's any help, Ember Data stores the new (unsaved) values of attributes in the model's _attributes hash. It's quite internal though so you might want to be careful with it - I would n't recommend manipulating it directly.

Categories : Ember Js



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.