Search Results

Search found 3307 results on 133 pages for 'distributed datasource'.

Page 73/133 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • Call server side method from JSON

    - by Zerotoinfinite
    How to call a method on a server side from JSON. Below is the code I am using SERVER SIDE: [WebMethod] private void GetCustomer( string NoOfRecords) { string connString = "Data Source=Something;Initial Catalog=AdventureWorks;Trusted_Connection=True;"; SqlConnection sCon = new SqlConnection(connString); SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM Sales.Customer WHERE CustomerID < '" + NoOfRecords+ "' ", sCon); DataSet ds = new DataSet(); da.Fill(ds); GvDetails.DataSource = ds.Tables[0]; GvDetails.DataBind(); } On Client Side: var txtID = document.getElementById('txtValue'); $.ajax({ type: "POST", url: "Default.aspx/GetCustomer", data: "{Seconds:'" + txtID +"'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(response) { alert(response); } }); Now I want that on button click, I would call the function at the client side [JSON], which pass the textbox value to the function. Please help

    Read the article

  • Debugging runtime error "Terminating app due to uncaught exception 'NSInternalInconsistencyException

    - by Bill
    I'm going through the Beginning iPhone Development book & stuck in chapter 9. I've spent a few hours trying to debug this error w/o avail: 2010-05-01 19:27:51.361 Nav2[4113:20b] *** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit/UIKit-984.38/UITableView.m:4709 2010-05-01 19:27:51.362 Nav2[4113:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:' 2010-05-01 19:27:51.364 Nav2[4113:20b] Stack: ( ... ) I'm not looking for help w/ the book, but tips for how to debug this error? Can I pin down which of my cellForRowAtIndexPath methods is the problem? And how to inspect the type? Or other things should I look at?

    Read the article

  • Weird repeater problem

    - by lopkiju
    I have a Repeater control in my aspx page: <asp:Repeater ID="repeater" runat="server" EnableViewState="false"> <ItemTemplate> <%# Eval("someAttribute") %> </ItemTemplate> </asp:Repeater> On Page_Load I have the following code: if (String.IsNullOrEmpty((string)Request.QueryString["action"])) s.OpenConn("SELECT * FROM someTable;"); else s.OpenConn("SELECT * FROM someTable WHERE id=1;"); if (s.Read()) { repeater.DataSource = s.GetRead(); repeater.DataBind(); } The problem is that when I enter ?action=something, data is not displayed on the page. But if I remove ?action=something, I get all the data. Am I doing something wrong?

    Read the article

  • Objectdatasource and Gridview : Sorting, paging, filtering

    - by Simon
    Hi there, Im using entity framework 1.0 and trying to feed out a Gridview with a objectdatasource that have access to my facade. The problem is, that it seems to be particulary difficult and haven't seen anything that realy do what i want it to do on the internet. For those who know, a gridview feeded with an objectdatasource, it can't sort automaticaly then you must do it manually. It's not that bad. Where it becomes a nightmare, its when we add paging and filter settings to a gridview's datasource. After many hours searching on the internet, i'm asking you, guys, if anyone knows a link that can explain me how to mix Pagging, Sorting and filtering for a gridview and an objectdatasource! Thanks in advance and sorry for my english.

    Read the article

  • ASP:LinkButton and Eval

    - by sgibbons
    I'm using an ASP:LinkButton inside of an ItemTemplate inside of a TemplateField in a GridView. For the command argument for the link button I want to pass the ID of the row from the datasource that the gridview is bound to, so I'm doing something like this: <asp:LinkButton ID="viewLogButton" CommandName="viewLog" CommandArgument="<%#Eval("ID")%>" Text="View Log" runat="server"/> Unfortunately, the resulting HTML is this: <asp:LinkButton ID="viewLogButton" CommandName="viewLog" CommandArgument="3" Text="View Log" runat="server"/> It seems that it is parsing the Eval() properly, but this is somehow causing it not to parse the LinkButton tag and just dump it out as literal text. Does anyone know: a) why this is happening and, b) what a good solution to this problem is?

    Read the article

  • Build dynamic LINQ?

    - by d daly
    Hi Im using #LINQ# to query data, but can anyone tell me how to build the query dynamically, if the user only wants to report on say 1 of the 3 fields? (see below) Thanks DD var query = from cl in db.tblClaims join cs in db.tblCases on cl.ref_no equals cs.ref_no where cl.claim_status == "Appeal" && cl.appeal_date >= Convert.ToDateTime(txtReferedFromDate.Text) && cl.appeal_date <= Convert.ToDateTime(txtReferedToDate.Text) && cs.referred_from_lho == dlLHO.Text && cs.adviser == dlAdviser.Text select new { Ref = cs.ref_no, ClaimType = cl.claim_type, ClaimStatus = cl.claim_status, AppealDate = cl.appeal_date }; gvReport.DataSource = query;

    Read the article

  • Related objects in reportingviewer 10.0.0.0 give #error

    - by Bart-Jan Poirot
    In my VB.net apps i make use of Linq2SQL and Reportviewer with RDLC reports. With Visual Studio 2010 they upgraded this reportviewer component so you can use the newer RDL specification from 2008. Now I've a problem to show related objects. For example assume you provide an order to the datasource of the report and then you can show something like Fields!Customer.Value.Name where Customer is a related entity. I also got the error in my immediate window: *Warning: The Value expression for the textrun ‘Name_1.Paragraphs[0].TextRuns[0]’ contains an error: The specified operation is not valid. (rsRuntimeErrorInExpression)*

    Read the article

  • WPF/MVVM - should we create a different Class for each ViewModel ?

    - by FMFF
    I'm attempting the example from the excellent "How Do I" video for MVVM by Todd Miranda found in MSDN. I'm trying to adapt the example for my learning purpose. In the example, he has a ViewModel called EmployeeListViewModel. Now if I want to include Departments, should I create another ViewModel such as DepartmentListViewModel? The example has EmployeeRepository as the Data Source. In my case, I'm trying to use an Entity object as the datasource (Employees.edmx in Model folder and EmployeeRepository.cs in DataAccess folder). If I want to display the list of Departments, should I create a separate class called DepartmentRepository and put all department related method definitions there? What if I want to retrieve the employee name and their department's name together? Where should I place the methods for this? I'm very new to WPF and MVVM and please let me know if any of the above needs to be re-phrased. Thank you for all the help.

    Read the article

  • Selected Item not being updated?

    - by iTayb
    I've got the following DropDownList control: <asp:DropDownList ID="SubjectFilter" runat="server" AutoPostBack="True" onselectedindexchanged="SubjectFilter_SelectedIndexChanged"></asp:DropDownList> SubjectFilter data: BookStore b = new BookStore(); b.LoadFromXML(Server.MapPath("list.xml")); SubjectFilter.DataSource = b.BooksList.Select(x => x.Subject).Distinct().ToArray(); SubjectFilter.DataBind(); SubjectFilter.Items.Insert(0, new ListItem("???", "Default")); Everything loads just fine. However in the SubjectFilter_SelectedIndexChanged method, SubjectFilter.SelectedValue is always Default, even though I'm selecting different options. What is the problem? Thank you very much.

    Read the article

  • error when calling the webservice

    - by xrx215
    i am getting a list of pagepack assistant by calling a webservice. I have added the web reference. using org.xerox.xde3.na.sdi.amiller_v_vista; public org.xerox.xde3.na.sdi.amiller_v_vista.DDCControl proxy; in page load method i am calling the web method as follows proxy = new DDCControl(); Guid y = new Guid("45a5b1c2-2fa5-4136-abdd-bc213b694848"); DataList1.DataSource = proxy.GetAllDDCs(this.AccountID, y); DataList1.DataBind(); I am getting the following error: An invalid data source is being used for DataList1. A valid data source must implement either IListSource or IEnumerable Can you please help me with this issue?

    Read the article

  • How can I add array data in winform datagridview?

    - by Phsika
    I generated Personel[] type array from Biz.Bal.GetPersonelById("1") but if I want to add winforms, I do that like below. Is there any simple method? Like GridView.dataSource=myArray? private void Form1_Load(object sender, EventArgs e) { Form_init(); Model.Personel[] list = new Model.Personel[0]; list = Biz.BAL.GetPersonelByID("1"); dataGridView1.Rows[0].Cells[0].Value = list[0].ID; dataGridView1.Rows[0].Cells[1].Value = list[0].Ad; dataGridView1.Rows[0].Cells[2].Value = list[0].SoyAd; dataGridView1.Rows[0].Cells[3].Value = list[0].Maas; dataGridView1.Rows[0].Cells[4].Value = list[0].Departman; }

    Read the article

  • Controlling azure worker roles concurrency in multiple instance

    - by NER1808
    I have a simple work role in azure that does some data processing on an SQL azure database. The worker basically adds data from a 3rd party datasource to my database every 2 minutes. When I have two instances of the role, this obviously doubles up unnecessarily. I would like to have 2 instances for redundancy and the 99.95 uptime, but do not want them both processing at the same time as they will just duplicate the same job. Is there a standard pattern for this that I am missing? I know I could set flags in the database, but am hoping there is another easier or better way to manage this. Thanks

    Read the article

  • Monotouch Example for QuickLook PDF

    - by nbonwit
    I am looking for a bare-bones pdf viewer example using the QuickLook Monotouch API. I have searched and have found bits and pieces but just can't seem to get it all integrated. I will be reading the pdf from a file pre-saved to the Personal folder on the iPad and would like to show the pdf as a modal view. If someone could post a bare-bones example, that would be much appreciated. What I have so far is below. Thanks! path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); pdfPath = System.IO.Path.Combine(path, "pdfReport.pdf"); QLPreviewController myPdfController = new QLPreviewController(); MyPdf pdfToShow = new MyPdf("", new Uri("")); // Not sure about this line myPdfController.DataSource = pdfPath; // Not sure what this line should be PresentModalViewController(myPdfController, true);

    Read the article

  • How to calculate unbound column value based on value of bound colum in DatagGridView?

    - by Wodzu
    Hi. I have few columns in my DataGridView, one of them is an unbound column and the DataGridVIew is in VirtualMode. When CellValueNeeded event is called, I want to calculate value of Cells[0] basing on the value of Cells[2] which is in bounded column to the underlaying DataSource. This is how I try to do this: private void dgvItems_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { e.Value = dgvItems.CurrentRow.Cells[2].Value * 5; //simplified example } However, I am getting System.StackOverflowException because it seams that call to dgvItems.CurrentRow.Cells[2].Value results in call to another CellValueNeeded event. And so on and so on... However Cells[2] is not an unbound column, so on common sense it should not result in recursive call unless getting value of any column(bound or unbound) firest that event... I can not use here SQL Expression and I can not precalculate e.Value in any SQL call. In real example Cells[2].Value is a key used in HashTable which will return a correct value for the Cells[0] (e.Value). What can I do?

    Read the article

  • Bind Data after TCP receive.

    - by gtas
    I have this strange problem all day now. I dunno if you handled something similar. I used two different serializers and now i know its not this problem. Im sending some data over TCP Sockets. Serialize - Send - Deserialize, everything works ok, i can get my objects search through them, use they're properties! But, if e.g receive a BusinessObject[] and convert into List<BusinessObject>, then bind the list in a Control.DataSource = businessObjectList; BOOM! NotSupportedException. Tried it with 3 different controls. Same behaviour. My head is empty of ideas right now!! The Send TCP happens on Desktop Framework, Receive on Compact Framework. But i dont think this has to do with anything. I wish for an explanation on this!

    Read the article

  • How to add Transactions with a DataSet created using the Add Connection Wizard?

    - by RoguePlanetoid
    I have a DataSet that I have added to my project where I can Insert and Add records using the Add Query function in Visual Studio 2010, however I want to add transactions to this, I have found a few examples but cannot seem to find one that works with these. I know I need to use the SQLClient.SQLTransaction Class somehow. I used the Add New Data Source Wizard and added the Tables/View/Functions I need, I just need an example using this process such as How to get the DataConnection my DataSet has used. Assuming all options have been set in the wizard and I am only using the pre-defined adapters and options asked for in this wizard, how to I add the Transaction logic to my Database. For example I have a DataSet called ProductDataSet with the XSD created for this, I have then added my Stock table as a Datasource and Added an AddStock method with a wizard, this also if a new item calls an AddItem method, if either of these fails I want to rollback the AddItem and AddStock in this case.

    Read the article

  • Ado.net ExecuteReader giving duplication while binding with datagrid

    - by Irvin Dua
    I am using below mentioned Ado.net function and resultset bind with grid view, however I am getting the duplicate rows in the resultset. Please help me out. Thanks Private _products As New List(Of Product) Public Property Products As List(Of BusinessObjects.Product) Get Return _products End Get Set(ByVal value As List(Of BusinessObjects.Product)) _products = value End Set End Property Public Function GetProductDetails() As List(Of Product) Dim product As New BusinessObjects.Product Using connection As New SqlConnection connection.ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString connection.Open() Using Command As New SqlCommand("select * from T_product", connection) Dim rdr As SqlDataReader rdr = Command.ExecuteReader While rdr.Read() product.ProductID = rdr("ProductID") product.ProductName = rdr("ProductName") Products.Add(product) End While GridView1.DataSource = Products GridView1.DataBind() End Using End Using Return Products End Function

    Read the article

  • Operation can only be performed on cells that belong to a DataGridView control

    - by The Demigeek
    The following code throws an InvalidOperationException with the above message and I don't understand why. My code calls the following method when the user may have made changes to the datagridview's underlying data source. The goal is to update the display with any changed data, and preserve the sort column and order. private void ReloadDataGridBindingListFromDatabase() { DataGridView dgv = myDataGridViewControl; DataGridViewColumn sortedColumn = dgv.SortedColumn; SortOrder sortOrder = dgv.SortOrder; //do stuff here to refresh dgv.DataSource if (sortedColumn != null) { //this line throws an exception sortedColumn.HeaderCell.SortGlyphDirection = sortOrder; } //etc. } Clearly, sortedColumn.HeaderCell is a cell that belongs to a DataGridView control. So why am I getting this exception? Many thanks for your input.

    Read the article

  • Of Datagridviews, databinding, and non validating cell values.

    - by Yanko Hernández Alvarez
    Lets simplify. Lets say I have this class: class T { public string Name { get; set; } public int Age { get; set; } public int height{ get; set; } ... } and I have a DataGridView's DataSource bound to a BindingList <T>, with N columns, each one bound to each property. I need to: Allow the user to enter non validating ages, heights, etc (for instance "aaa") Color the cells with non validating values (red background) Retain the non validating values displayed until the form is closed (I don't want to lose the values entered until the form is closed, so the user has the option to correct the bad cells anytime he wants BEFORE closing the form) Keep the last correct values entered for each cell with non validating values entered. When the form is closed, ditch the non validating values and keep the last correct values entered. Is there any easy way to do this?

    Read the article

  • Custom control in DataViewGrid

    - by Winston
    I'm trying to embed a custom control in a Datagridview. I've looked at the Calendar (http://msdn.microsoft.com/en-us/library/7tas5c80.aspx) example but i just cant get it working for a custom control. I need the control to show for each object in the grid. Not just when the user edits the content. I need to do this so that i can bind my dataviewgrid to a datasource and have it create the required forms in the grid for each my object list. So that the user can do inline editing in the grid without having to double click the row and have a new dialog pop up. Any help would be greatly appreciated.

    Read the article

  • What are the alternative ways to export excel file

    - by fealin
    i m trying to generate an excel file from my web page but i have some issues with Turkish chars such as "I" "g" when i open the file some chars are incorrect (I seems Ä°) here is my code gvExpRequests.DataSource = dsExpRequests; gvExpRequests.DataBind(); gvExpRequests.GridLines = GridLines.Both; Page.EnableViewState = false; Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=export.xls"); Response.ContentType = "application/ms-excel"; Response.ContentEncoding = Encoding.UTF8; Response.BinaryWrite(Encoding.UTF8.GetPreamble()); StringWriter yaz = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(yaz); gvExpRequests.RenderControl(htw); i don't know what's wrong with here i tried a lot of encoding but i got same results every time i want to try something different to do this are there any another way to export a excel file from a gridview

    Read the article

  • Multiple Grails Applications create Ehcache conflicts

    - by Lloyd Meinholz
    I am running multiple Grails Applications on one of my servers. I am using Grails 1.2.2. I am using the default cache configuration in DataSource.groovy. When I try and run two Grails applications, they both seem to be using/writing to: /tmp/org.hibernate.cache.UpdateTimestampsCache.data When I look at how to customize Ehcache with an ehcache.xml file from this page: http://ehcache.org/documentation/grails.html I do not see any information about specifying the locations and/or names or temporary files. How do I avoid this issue when running multiple Grails applications on the same server (without turning off the cache)?

    Read the article

  • C#: access a class property when the property identifier is known as a string

    - by Hans
    Hi, I'm using LINQ to Entities on a database which structure is not known in advance. I use reflection to retrieve the information, and now have a list of strings with all the table names. Because I use LINQ, I also have the datasource encapsulated in a C# class (linqContext), with each table being a property of that class. What I want to achieve is this: Assume one of the strings in the table names list is "Employees". This is known in code, I want to do the following: linqContext.Employees.DoSomethingHere(); Is this possible? I know that if all the propertie were just items in a list, I could use the string as indexer, linqContext["Employees"]. However, this is not the case :(

    Read the article

  • Bind Data to Multiple Labels From Multiple DataSources

    - by Steven
    I have two AccessDataSources each returning one row. I want to use the data in each row to populate content on my page, so I figured I would use a Repeater or FormView. However, I would not necessarily want the labels bound to a particular DataSource placed together. For example, I might want labels from the following columns in order (DataSourceName.ColumnName): TestSetup.TestType, TestSummary.FormattedValue, TestSetup.DeviceChannel, TestSummary.CompletedOn. How do I handle this? Do I just have a separate Repeater/FormView for each value? Can I have both Repeater's/FormView's in 'scope' at the same time? Note: No language preference (C#/VB).

    Read the article

  • Access Edit Mode Values of BindingSource Control

    - by Christopher Edwards
    I have a BindingSource control (http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource.aspx) with a datasource of a (single) Linq object. If I change any of the properties of the underlying Linq-to-Sql object then all the other changes on the bound controls on the form are lost. Does anyone now why and how I work around it? I don't want to call EndEdit because this will commit the changes to the underlying object. I think this might be because my underlying object linq-to-sql object does not implement IEditableObject so the potental new values for the object fields are sort of stored in the forms controls. Can anyone either clarify what is going on and/or suggest a work around. Thanks!

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >