Search Results

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

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

  • Locked DataGridView. Linq is a problem ?

    - by phenevo
    Hi, I get the collection from webservice: var allPlaceHolders = (from ph in new MyService().GetPlaceHolders() select ph).Select(l => new { Code = l.Code, Name = l.Name, Related = false }).ToList(); dgPlaceHoldersAdd.DataSource = allPlaceHolders; Designer.cs: this.dgPlaceHoldersAdd.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgPlaceHoldersAdd.Location = new System.Drawing.Point(3, 54); this.dgPlaceHoldersAdd.Name = "dgPlaceHoldersAdd"; this.dgPlaceHoldersAdd.RowHeadersVisible = false; this.dgPlaceHoldersAdd.Size = new System.Drawing.Size(286, 151); this.dgPlaceHoldersAdd.TabIndex = 15; The problem is, that I can't changing value of checkBox column. I has enabled AutoGeneratedColumns (In datagridview at start there is not any column)

    Read the article

  • DataBinding and ErrorProvider - How to provide custom error messages?

    - by BeowulfOF
    We use BusinessObjects, implementing IDataErrorInfo and IEditableObject. BindingLists with those Objects are added to BindingSources, those are used to bind UserControls and DataGrids on the forms (WinForms). The BindingSource is additionally set as DataSource to the ErrorProvider of the form. We do use currently TextBoxes for Properties of Type int and short. They are validated inside the BusinessObjects with custom validation, like min/max values, etc. That works fine, since error message form our custom validations show up nicely next to the TextBox. However, if the input is greater than the value of an int (e.g. "9999999999") the BindingSource doesn't even try to enter that Value into the BusinesObject but instead gives the errormessage to the errorprovider like "The value for Int32 was too big.". We do not want to bother our users with "Int32" but want a custom errormessage for that. It is nice, that the BindingSource does provide this feature, but is it possible to provide custom error messages for this?

    Read the article

  • fill dropdown list by querystring

    - by KareemSaad
    I Had Drop down list and I want to fill it with data from database through stored procedure and it had it,s value when specific query string I had two query string. as private void LoadWithCategory() { if (Request.QueryString["Category_Id"] != null) { using (SqlConnection Con = Connection.GetConnection()) { SqlCommand Com = new SqlCommand("GetProducFamilyTP", Con); Com.CommandType = CommandType.StoredProcedure; Com.Parameters.Add(Parameter.NewInt("@Category_Id", Request.QueryString["Category_Id"])); SqlDataReader DR = Com.ExecuteReader(); if (DR.Read()) { DDLProductFamily.DataSource = DR; DDLProductFamily.DataTextField = DR["Name"].ToString(); DDLProductFamily.DataValueField = DR["ProductCategory_Id"].ToString(); DDLProductFamily.DataBind(); } DR.Close(); } } } ALTER Proc GetProducFamilyTP ( @Category_Id Int ) AS Select Distinct Categories.Category_Id ,ProductCategory.Name , ProductCategory.ProductCategory_Id From Category_ProductCategory Inner Join Categories On Category_ProductCategory.Category_Id=Categories.Category_Id Inner Join ProductCategory On Category_ProductCategory.ProductCategory_Id=ProductCategory.ProductCategory_Id Where Categories.Category_Id =@Category_Id but this error occurred DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name '4Door'.

    Read the article

  • ajaxtabcontainer with button postback problem

    - by yousof
    I have a dropdownlist in my web page and two command buttons and a tabcontainer. The tabcontainer does not appear after the load of page according to my code. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then TabContainer1.Visible = False If CtvAct.GetRecords("Fill_RequestTypeTb") = True Then ReqTypeCmbo.DataSource = CtvAct.MainDataset.Tables("tbOLRequestType").DefaultView ReqTypeCmbo.DataTextField = "RequestTypeName" ReqTypeCmbo.DataValueField = "RequestTypeId" ReqTypeCmbo.DataBind() Dim itm As New ListItem itm.Text = "-- ??? ??? ????? --" itm.Value = "-1" itm.Selected = True ReqTypeCmbo.Items.Insert(0, itm) ReqTypeCmbo.SelectedIndex = 0 End If End If End Sub Protected Sub PrntCmd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PrntCmd.Click TextBox6.Text = "gggg" End Sub If I press any button after page load the button work very selecting any item from dropdownlist make the tabcontainer appear but after the tabcontainer appear, the buttons does not work (postback) how can I solve these problems

    Read the article

  • xsl:include fails after upgrading PHP version; is libxml/libxslt version mismatch the issue?

    - by Wiseguy
    I'm running Windows XP with the precompiled PHP binaries available from windows.php.net. I upgraded from PHP 5.2.5 to PHP 5.2.16, and now the xsl:includes in some of my stylesheets stopped working. Testing each version in succession, I discovered that it worked up through 5.2.8 and does not work in 5.2.9+. I now get the following three errors for each xsl:include. Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: I/O warning : failed to load external entity "file%3A/C%3A/path/to/included/stylesheet.xsl" in ... on line 227 Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: compilation error: file file%3A//C%3A/path/to/included/stylesheet.xsl line 36 element include in ... on line 227 Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: xsl:include : unable to load file%3A/C%3A/path/to/included/stylesheet.xsl in ... on line 227 I presume this is because it cannot find the specified file. Many of the includes are in the same directory as the stylesheet being transformed and have no directory in the path, i.e. <xsl:include href="fileInSameDir.xsl">. Interestingly, in the first and third errors, it is displaying the file:// protocol with only one slash instead of the correct two. I'm guessing that's the problem. (When I hard-code a full path using "file:/" it fails, but when I hard-code a full path with "file://" it works.) But what could cause that? A bug in libxslt/libxml? I also found an apparent version mismatch between libxml and the version of libxml that libxslt was compiled against. 5.2.5 libxml Version = 2.6.26 libxslt compiled against libxml Version = 2.6.26 5.2.8 libxml Version = 2.6.32 libxslt compiled against libxml Version = 2.6.32 === it breaks in versions starting at 5.2.9 === 5.2.9 libxml Version = 2.7.3 libxslt compiled against libxml Version = 2.6.32 5.2.16 libxml Version = 2.7.7 libxslt compiled against libxml Version = 2.6.32 Up until PHP 5.2.9, libxslt was compiled against the same version of libxml that was included with PHP. But starting with PHP 5.2.9, libxslt was compiled against an older version of libxml than that which was included with PHP. Is this a problem with the distributed binaries or just a coincidence? To test this, I imagine PHP could be built with different versions of libxml/libxslt to see which combinations work or don't. Unfortunately, I'm out of my element in a Windows world, and building PHP on Windows seems over my head. Regrettably, I've been thus far unable to reproduce this problem with an example outside my app, so I'm struggling to narrow it down and can't submit a specific bug. So, do you think it is caused by a version mismatch problem in the distributed binaries? a bug introduced in PHP 5.2.9? a bug introduced in libxml 2.7? something else? I'm stumped. Any thoughts that could point me in the right direction are greatly appreciated. Thanks.

    Read the article

  • Compile Error Using singleton - iPhone SDK

    - by mrburns05
    Since someone here is a bit hot-headed and deleted my last question ill post a new one with a title to better please his ego...Hows this Michael? Anyways, im getting this error when i compile: Undefined symbols: "_OBJC_CLASS_$_SortedItems", referenced from: __objc_classrefs__DATA@0 in SortedByNameTableDataSource.o ld: symbol(s) not found collect2: ld returned 1 exit status Basically i followed apples "TheElements" sample app to create the singleton, tableview datasource and just changed some stuff around to suit my needs - ive triple checked all my code and cannot figure out why im getting this.. If anyone can help please do, it would be much appreciated. if more of my code is needed ill post.. let me know

    Read the article

  • Binding Generic List Array to GridView

    - by OliverS
    Hi I have a List which returns an array of "Question". My question is how can I bind this to a grid view? When I try to call Question.Ordinal I get that it does not exist in the data source. I am using the following code: GridView1.DataSource = myList.GetQ(); GrdiView1.DataBind(); myList.GetQ() returns a List which is an array of "Question". When I set the column DataField to "!" I get the object Question. My question is how can I get the objects property? I tried "!.Ordinal" does not work. I was reading this post for reference, here, any help is greatly appreciated, thanks.

    Read the article

  • nested repeaters - how to sort

    - by Cristian Boariu
    Hi guys, I have a table: Category with some sort of categories category1 category2 category3 I have another table Subcategory which has a fk to Category. So, each category1 can have subcategoryB, subcategoryA, subcategoryZ. Well... i've made two repeaters. The first one is binded to a linq data source which takes the categories from the parent table. The children repeater is binded to that foreign key like: DataSource='<%# Eval("Subcategories_1s") %' So the result is: category1 subcategoryB subcategoryA subcategoryZ category2 etc. Well, the strange question is: how can i order the subcategories alphabetically? If i'd have binded the children repeater to a linq it would be easy. But in this case...?

    Read the article

  • DataGridView and Binding List Event.

    - by bearrito
    I have a datagridview with a datasource of type binding list. I understand that when the datagridview changed this will update the items in the binding list. I also know that if the objects in the bindinglist implement Inotifypropertychanged then if the obects are changed outside the grid then the objects will notify the bindlist which will then notify the datagrid My question is: If the datagrid view changing an object, I want the bindinglist or changed object to fire an event that allows me to pass the object to a WCF service that will persist the object on the data access layer side e.g. Service.Save(ChangedObject) How would I go about doing this?

    Read the article

  • Sybase ODBC connection String with .net

    - by nitinkhanna
    Hi, I am having SYBASE 12.5 install on my server as well as my PC, I am unable to get the correct connection string. I have used the connectionstrings.com but unable to get the correct one. After runnig and making the connection Driver={Sybase ASE ODBC Driver};srvr=server_name;database=database_name;UID=user_name;PWD=pass; and some other combination of thic connection string I am getting the Datasource ="" Driver ="" DataBase="" ServerVersion = Invalid Operation. Connection is closed What am I suppose to correct in that. Please help. Thanks

    Read the article

  • Linq to SQL Where clause based on field selected at runtime

    - by robasaurus
    I'm trying to create a simple reusable search using LINQ to SQL. I pass in a list of words entered in a search box. The results are then filtered based on this criteria. private IQueryable<User> BasicNameSearch(IQueryable<User> usersToSearch, ICollection<string> individualWordsFromSearch) { return usersToSearch .Where(user => individualWordsFromSearch.Contains(user.Forename.ToLower()) || individualWordsFromSearch.Contains(user.Surname.ToLower())); } Now I want this same search functionality on a different datasource and want to dynamically select the fields to apply the search to. For instance instead of IQueryable of Users I may have an IQueryable of Cars and instead of firstname and surname the search goes off Make and Model. Basically the goal is to reuse the search logic by dynamically selecting what to search on at runtime.

    Read the article

  • Error: A SQLParamenter wtih ParameterName @myparm is not contained by this SQLParameter Collection

    - by SidC
    Good Morning, I'm working on an ASP.NET 3.5 webforms application and have written the following code: Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click Dim connectionString As String = WebConfigurationManager.ConnectionStrings("Diel_inventoryConnectionString").ConnectionString Dim con As New SqlConnection(connectionString) Dim adapter1 As New SqlDataAdapter adapter1.SelectCommand = New SqlCommand adapter1.SelectCommand.CommandType = CommandType.StoredProcedure adapter1.SelectCommand.CommandText = "PartSproc" Dim parmNSN As New SqlParameter("@NSN", SqlDbType.NVarChar) Dim parmName As New SqlParameter("@PartName", SqlDbType.NVarChar) txtNSN.Text = adapter1.SelectCommand.Parameters("@NSN").Value txtSearch.Text = adapter1.SelectCommand.Parameters("@PartName").Value Dim dt As New DataTable() adapter1.Fill(dt) MySearch.DataSource = dt MySearch.DataBind() End Sub When I run the page, I receive the error A SQLParameter with @NSN is not contained by this SQLParameter Collection. I tried using apostrophes around the @NSN and @PartName but that does not work either and presents expression expected error. How might I rectify the above code so that it references the @NSN and @PartName parameters correctly? Thanks, Sid

    Read the article

  • Is it possible to rebind sql paramters using the result from a cfquery?

    - by Larry
    When I run the following code: <cfquery name="someQuery" result="queryResult" datasource="wetakepictures"> SELECT id FROM events WHERE category_id = <cfqueryparam value="1" cfsqltype="cf_sql_integer"> OR title like <cfqueryparam value="%test%" cfsqltype="cf_sql_varchar"> </cfquery> <cfoutput> #queryResult.sql# <br /> #ArrayToList(queryResult.sqlparameters)# </cfoutput> It outputs: SELECT id FROM events WHERE category_id = ? OR title like ? 1,%test% I need the actual string "SELECT id FROM events WHERE category_id = 1 OR title like '%test%'". Is there a way to rebind the parameters to the sql?

    Read the article

  • sql and pooled connection error

    - by user319075
    Dear all, Kindly look at the following code as this sample code gives an error when i hosted it on Hostexcellence , but locally it runs perfect, and the error is as the following: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached SqlDataSource1.SelectCommand = "Select Top (3) * from News Order by NewsID Desc"; SqlDataSource1.DataSourceMode = SqlDataSourceMode.DataReader; SqlDataReader r_News = (SqlDataReader)SqlDataSource1.Select(DataSourceSelectArguments.Empty); DataGrid_News.DataSource = r_News; r_News.Close(); DataGrid_News.DataBind(); So What's wrong with that code ??

    Read the article

  • How can I reorder columns in a DataGridView?

    - by Luiscencio
    so I fill my DGV with some data and set some columns invisible: var part = inventory.espiromex_product.Where(p => p.descriptionsmall == cmbMainP.Text).First().partnumberp; dtgAssy.DataSource = inventory.espiromex_productsub.Where(p => p.partnumberp == part); dtgAssy.Columns["idproductsub"].Visible = false; dtgAssy.Columns["partnumberp"].Visible = false; dtgAssy.Columns["partnumbersubp"].Visible = true; dtgAssy.Columns["quantity"].Visible = true; dtgAssy.Columns["comments"].Visible = true; dtgAssy.Columns["assemblyno"].Visible = false; dtgAssy.Columns["assemblynodesc"].Visible = false; dtgAssy.Columns["uomid"].Visible = true; dtgAssy.Columns["subassemblylevelnumber"].Visible = false; dtgAssy.Columns["scrappercent"].Visible = true; this is just fine but columns are sorted Alphabetically, How can I reorder columns programmatically? note that inventory is an Entitie and I am using Linq to Entities.

    Read the article

  • WPF passing the Int argument to a data object provider method

    - by SAD
    Hi, I'm trying to produce a master/detail datagrid view. I'm using object data providers. Now I have seen many examples when the argument of a method for returning the records for the detail view is a string, like in this example: <!-- the orders datasource --> <ObjectDataProvider x:Key="OrdersDataProvider" ObjectType="{x:Type local:OrdersDataProvider}"/> <ObjectDataProvider x:Key="Orders" MethodName="GetOrdersByCustomer" ObjectInstance="{StaticResource OrdersDataProvider}" > <ObjectDataProvider.MethodParameters> <x:Static Member="system:String.Empty"/> </ObjectDataProvider.MethodParameters> </ObjectDataProvider> But in my case, the argument that I want to pass is the int ID not the string. Can I still somehow use the object data provider to return all the records from the database for the detail view if the argument passed to a method has to be an int? How could it be implemented in MVVM? Thanks a lot for any advice1

    Read the article

  • Populate DataGridViewComboBoxColumn runtime

    - by ghiboz
    Hi all! I have this problem: I have a datagridview that reads the data from a db and I wish, for an integer column use a combobox to choose some values... I modified the column using DataGridViewComboBoxColumn type and after, on the init of the form this: DataTable dt = new DataTable("dtControlType"); dt.Columns.Add("f_Id"); dt.Columns.Add("f_Desc"); dt.Rows.Add(0, "none"); dt.Rows.Add(1, "value 1"); dt.Rows.Add(2, "value 2"); dt.Rows.Add(3, "value 3"); pControlType.DataSource = dt; pControlType.DataPropertyName = "pControlType"; pControlType.DisplayMember = "f_Desc"; pControlType.ValueMember = "f_Id"; but when the program starts (after this code) this message appears:

    Read the article

  • Using a ControlParameter in FilterParameters when the property is null

    - by end-user
    I have a DataList and FormView; they have separate datasources, though they pull the same info. The FormView's datasource has a FilterExpression to pull whatever's been selected on the DataList. On first load, the SelectedValue of the DataList is null (naturally). I expect the FilterExpression to result in zero rows, but it doesn't. If I set the DefaultValue to 0, it does, but then the parameter never updates when I select something from the DataList. Am I doing it wrong?

    Read the article

  • DataGridView's SelectionChange event firing more than once on DataBinding

    - by Shantanu Gupta
    This Code triggers selection change event twice. how can I prevent it ? Currently i m using a flag or focused property to prevent this. But what is the actual way ? I am using it on winfoms EDIT Mistake in writing Question, here is the correct code that i wanted to ask private void frmGuestInfo_Load(object sender, EventArgs e) { this.dgvGuestInfo.SelectionChanged -= new System.EventHandler(this.dgvGuestInfo_SelectionChanged); dgvGuestInfo.DataSource=dsFillControls.Tables["tblName"]; this.dgvGuestInfo.SelectionChanged += new System.EventHandler(this.dgvGuestInfo_SelectionChanged); } private void dgvGuestInfo_SelectionChanged(object sender, EventArgs e) { }

    Read the article

  • NoClassDefFound error - Spring JDBC

    - by glowcoder
    Right now, I'm compiling my .class files in eclipse and moving them over to my %tomcat_home%\webapps\myapp\WEB-INF\classes directory. They compile just fine. I also have in the ...\classes directory a org.springframework.jdbc-3.0.2.RELEASE.jar which I have verified has the org.springframework.jdbc.datasource.DriverManagerDataSource class inside it. However, I get a NoClassDefFound error when I run my class and it tries to DriverManagerDataSource source = new DriverManagerDataSource(); I don't understand why it wouldn't be finding that jar. Any help is appreciated!

    Read the article

  • Analysis Services with excel as front end - is it possible to get the nicer UI that powerpivot provi

    - by AJM
    I have been looking into PowerPivot and concluded that for "self service BI" and ahoc buidling of cubes it has its uses. In particular I like the enhanced UI that you get from using PowerPivot rather than just using a PivotTable hooked up to an analysis services datasource. However it seems that hooking up PowerPivot to an existing analysis services cube is not a solution for "organisational BI". It is not always desireable to suck millions of rows into excel at once and the interface between PowerPivot and analysis services is very poor in my book. Hence the question is can an existing analysis services solution get the enhanced ui features that power pivot brings, withoout using powerpivot as the design tool? If powerpivot is aimed ad self service/personal BI then it seems bizare that the UI for this is better than for bigger/more costly analysis services solutions.

    Read the article

  • ASP.Net Form Databound problems

    - by Jason Bitman
    I know there is a similar problem on this forum, but the solutions did not really work for me. I am populating form controls with fields from a few different data sources, and the data shows up great. I have an ImageButton controlwhich has an OnClick Event set to grab all of the data from the form. Unfortunately, when I click the button, it seems as though the page is reloading first, and THEN is executes the OnClick call. The data that was hand-entered, or hard-coded seems to be pulled fine from the controls it was entered in, but anything that was pulled from a datasource is not able to be read. Any ideas. this is the last hurdle in a project that I have been working on for 6 months. I want to go home... Thank you so much in advance. Jason

    Read the article

  • How to programmatically change a data cell of Ms Access using VB.Net?

    - by manuel
    I have a Microsoft Access database file connected to VB.NET. In the database table, I have a 'No.' and a 'Status' column. Then I have a textbox where I can input an integer. I also have a button, which will change the data cell in 'Status' where 'No.' = textbox.Text(), when I click it. Let's say I want the 'Status' cell to be changed to "Low". What codes should I put in the button_Click event handler? Here is the codes I used to retrieve and display the database table. Public Class theForm Dim con As New OleDb.OleDbConnection Dim ds As New DataSet Dim daTitles As OleDb.OleDbDataAdapter Private Sub theForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|\db1.mdb" con.Open() daTitles = New OleDb.OleDbDataAdapter("SELECT * FROM Titles", con) daTitles.Fill(ds, "Titles") DataGridView1.DataSource = ds.Tables("Titles") DataGridView1.AutoResizeColumns() End Sub

    Read the article

  • How do I detect when a cell's value has changed in Silverlight?

    - by jvenema
    Hey folks, I'm working in Silverlight, trying to figure out how to set a grid cell font color based on the contents of the cell. I have an ObservableCollection bound to a DataGrid, and my items implement INotifyPropertyChanged so the grid updates as I change the values; it's all working perfectly, including letting me sort items and keep the sorting while I update the underlying items. I know I can use the LoadingRow event to change colors, but the only way I can get the event to fire is by changing the grids datasource, in which case my sorting goes out the window. So, what I really want is a way to either 1) loop the rows in the datagrid, find the cell I need, and change it's color or 2) implement a custom column that I can use to dynamically set the color. The problem is how to actually do either of those things :) All suggestions welcome.

    Read the article

  • How to make a thread try to reconnect to the Database x times using JDBCTemplate

    - by gillJ
    Hi, I have a single thread trying to connect to a database using JDBCTemplate as follows: JDBCTemplate jdbcTemplate = new JdbcTemplate(dataSource); try{ jdbcTemplate.execute(new CallableStatementCreator() { @Override public CallableStatement createCallableStatement(Connection con) throws SQLException { return con.prepareCall(query); } }, new CallableStatementCallback() { @Override public Object doInCallableStatement(CallableStatement cs) throws SQLException { cs.setString(1, subscriberID); cs.execute(); return null; } }); } catch (DataAccessException dae) { throw new CougarFrameworkException( "Problem removing subscriber from events queue: " + subscriberID, dae); } I want to make sure that if the above code throws DataAccessException or SQLException, the thread waits a few seconds and tries to re-connect, say 5 more times and then gives up. How can I achieve this? Also, if during execution the database goes down and comes up again, how can i ensure that my program recovers from this and continues running instead of throwing an exception and exiting?

    Read the article

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