w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Cannot find Datagrid's Datasource Property
Seems like you are using WPF DataGrid, in WPF datagrid you only have ItemsSource

Categories : C#

Adding additional columns to winforms datagrid with datasource
When AutoGenerateColumns is false, You must add DataGridTextColumn for each property, like this, where Name and BookType are the properties of the Book class. <sdk:DataGrid Name="dataGrid" AutoGenerateColumns="False" SelectionMode="Single"> <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Header="Book Name" Binding="{Binding Name, Mode=TwoWay}"/> <sdk:DataGridTextColumn Header="Book Type" Binding="{Binding BookType, Mode=TwoWay}"/> </sdk:DataGrid.Columns> </sdk:DataGrid>

Categories : C#

ASP .NET Nested Datagrid - Field or Property was not found on selected datasource error
Look at this part: DataTable dtQuoteHed = new DataTable("dtQuoteHed"); dtQuoteHed.Columns.Add("QuoteNum", typeof(int)); dtQuoteHed.Columns.Add("QuoteLine", typeof(int)); You are defining Quoteline column for dtQuoteHed table but in the schema dtQuoteHed element does not have Quoteline child element. So remove it from dtQuoteHed data table: DataSet dsQuote = new DataSet("dsQuote"); DataTable dtQuoteHed = new DataTable("dtQuoteHed"); dtQuoteHed.Columns.Add("QuoteNum", typeof(int)); dtQuoteHed.Columns.Add("TerritoryTerritoryDesc", typeof(string)); dtQuoteHed.Columns.Add("DueDate", typeof(DateTime)); dtQuoteHed.Columns.Add("BTCustID", typeof(string)); dtQuoteHed.Columns.Add("CustomerName", typeof(string)); dtQuoteHed.Columns.Add("QuoteAmt", typeof(decimal)); dtQuoteHed.PrimaryKey =

Categories : C#

How to register wso2 datasource defined in custom-datasource.xml in jndi
The useDataSourceFactory should be set as an attribute of jndiConfig element. So your datasource configuration should shange as follows. <datasource> <name>IPL_DS_IDB</name> <description>My custom datasource</description> <jndiConfig useDataSourceFactory="true"> <name>IPL_DS_DB</name> <environment> <property name="java.naming.factory.initial">com.sun.jndi.rmi.registry.RegistryContextFactory</property> <property name="java.naming.provider.url">rmi://localhost:10002</property> </environment> </jndiConfig> <definition type="RDBMS"> <configuration> <url&g

Categories : Wso2

GridView with both declarative (Html side) datasource and code-behind datasource
It is possible only under one condition.That you set the DataSourceID to nothing of your gridview before re-assigning its datasource to a datatable.Otherwise visual Studio will scream loudly at you in these lines 'Both DataSource and DataSourceID are defined on 'yourGrid'. Remove one definition.' yourgrid.DataSourceID=null; yourGrid.DataSource=yourDataTable;

Categories : Asp Net

Can you use Kendo UI's dataSource to get data straight from a database or C# dataSource?
Yes. It can bind to pretty much any source of json, so you have a lot of options. In WebForms, a good one is WebMethods. You could add a WebMethod to your form and then bind the DataSource to it. Or you could also create a web service, or build an aspx that renders json or xml instead of html (make sure you set the content-type!), or even call a static file that contains json. I would start with reading this overview of the DataSource: http://docs.kendoui.com/getting-started/framework/datasource/overview

Categories : C#

Silverlight Datagrid scrolling, DataGrid fires RowLoading event
The RowLoading event is fired because rows are virtualized. With virtualization, rows are created (and loaded) only when they are visible on screen. So every time you scroll down or up a new row is created, loaded and the RowLoading event fired. To disable the virtualization you can try to set this property: VirtualizingStackPanel.VirtualizationMode="Standard" Be aware that this can slow down the performance of your grid if you have a lot of rows.

Categories : Database

DataGrid edition 'EditItem' is not allowed for this view` when bound to a WPF DataGrid
I tried this and the problem is that you have initialized your Level2 collection as Hashset<>. IEditableCollectionView.EditItem() throws this error while trying to update item in Hashset<>. I initialized the collection as List<> and it was working fine. I am not sure why it is not able to update item in hashset, need to look deeper into it. But changing the Hashset<> to List<> will fix this error. Hope it helps Thanks

Categories : C#

Binding ComboBoxColumn to collection from DataGrid's ItemsSource in WPF DataGrid
MSDN: DataGridComboboxColumns says: To populate the drop-down list, first set the ItemsSource property for the ComboBox by using one of the following options: A static resource. For more information, see StaticResource Markup Extension. An x:Static code entity. For more information, see x:Static Markup Extension. An inline collection of ComboBoxItem types. So basically to just bind to data object`s collection property it`s better to use DataGridTemplateColumn: <DataGridTemplateColumn Header="Log"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding log}" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> This type of c

Categories : Wpf

Failed to convert property value of type C3P0PooledDataSource to required type javax.sql.DataSource for property dataSource
The class C3P0PooledDataSource does not implement javax.sql.DataSource. It is used for something completely different, JMX notifications. Use ComboPooledDataSource instead.

Categories : Mysql

Copy selected row from datagrid at the end of datagrid
For Datagridview Databound you have to commit additional record to datasource (table) So, you have to do "INSERT INTO mytable ( fields here ... ) VALUES ( values here ..)" then to refresh your datagridview .. dt2.datasource = mytable ADDED : For your code ... try change like this insert_cmd.Parameters.AddWithValue("@Name", .item("Name")) insert_cmd.Parameters.AddWithValue("@Age", .item("Age"))

Categories : Sql Server

Validating A WPF Datagrid Against Data From Another Datagrid
From Microsoft official WPF course materials: ValidationRules are only to be used as simple validations (For instance Required fields, numeric formats, etc). If you need advanced / complex Business Rules validation, you should either implement IDataErrorInfo or create your own validation mechanism (that's what I did and it works like a charm)

Categories : C#

Master-Detail: On row click in master (DataGrid), display details (DataGrid)
If you searched online, you would have found a number of answers. For example, please take a look at the following articles: WPF Master Details MVVM Application Implementing a simple Master-Detail scenario for WPF in MVVM MVVM - Master Detail

Categories : Wpf

Copying data from a datagrid view to a new form with a new datagrid view VB
"Error 1 Reference to a non-shared member requires an object reference." As this message says: You need a instance of form2 - object of type form2created with New sub, which you created inside of BTN_Next_Click. But local variable frm_PI_01 can be used only inside of that function. With name of class form2 you can used only Shared member or functions/subs MSDN Shared members in VB My opinion if you need transfer some information/variables from form to another then in your case(when you transfer data only once when creating form) use a parameters in form constructors. Add another parameter to you form3 constructor. For example reference of your datagridview(this is may be not good practice referenced controls to another form, better create some variable with needed data and reference th

Categories : Vb.Net

Binding datagrid in datagrid
You have problem with DataContext here. In RowDetailsTemplate you trying to binding to a property in main view model, but DataContext of RowDetailsTemplate is the row item. If you want to binding to property in your main view model you should use RelativeSource binding. Try this: <DataGrid ItemsSource="{Binding Path=Files}" SelectedItem="{Binding Path=DataContext.CurentFile, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" AutoGenerateColumns="False" > ...

Categories : Wpf

How can embed datagrid in datagrid
I don't think it's possible. You can indeed manually replace a cell with the HTML of another grid (your "child" grid), but Dojo maintains its data in a store. Your store won't be "aware" of any changes you make in the DOM nodes of your grid, and inserting a DataGrid in a store isn't possible either since the DataGrid maps its columns to properties of the data objects.

Categories : Database

How to add a new row in sql from datagrid and update sql row from same datagrid?
This article on codeproject does a nice (thorough) job of demonstrating what you are asking. It also comes with some demo code. http://www.codeproject.com/Articles/37430/Datagrid-Editing-Updating-Cancel-Selecting-Rows

Categories : SQL

How to get a DataSource?
A DataSource allows getting a JDBC connection mostly from a pool of connections. A DataSource object represents a particular DBMS or some other data source, such as a file. If a company uses more than one data source, it will deploy a separate DataSource object for each of them. The DataSource interface is implemented by a driver vendor. You externalize DB connection properties file and fetch the object using JNDI. Using a Datasource you need to know only the JNDI name. The Application server cares about the details. It can be implemented in three different ways: A basic DataSource implementation produces standard Connection objects that are not pooled or used in a distributed transaction. A DataSource implementation that supports connection pooling produces Connection objects that par

Categories : Java

ODBC or SQL DataSource?
Well from what I quickly searched you would use SQL DataSource to connect to an ODBC Database. No matter, you should always be able to give your users the control to select a database table name and then return them all the data you want from that table. This can be done with either a nice switch statement as to not trust what the user submits in the form or well actually yeah you should use a switch statement because NEVER TRUST USER INPUT. You could get a little fancy and create a dynamic switch statement generated from a query to the DB of what tables appear in the DB and then add whatever code you need to get the return. Hope that is a point in the correct direction for you. EDIT switch out table names for Database names, same concept though.

Categories : SQL

ASP .NET Datapager and datasource
Guess I figured it out. After several tries; this is finally working. protected void filter_TextChanged(object sender, EventArgs e) { this.dataPager.SetPageProperties(0, this.Invoices_DataPager.PageSize, false); this.listview.DataBind(); } Every time filter changes; datapager is set to very first page. Hope it helps anyone with same problem.

Categories : Asp Net

Grid Datasource in WP8
Here's the xaml <ListBox x:Name="NameList"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=Name}" Width="200"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> cs using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; using StackOverFlowTestApp.Resources; using Microsoft.Phone.Tasks; using Microsoft.Phone.UserData; namespace StackOverFlowTestApp { public partial class MainPage : PhoneApplicationPage { pr

Categories : C#

ASP.NET XML datasource for Menu
You can use SiteMap, the SiteMap works like XML. In SiteMap: <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="MenuFromXml.aspx" title="Book" description=""> <siteMapNode url="MenuFromXml.aspx?id=Asp.Net" title="Asp.Net" description="" /> <siteMapNode url="MenuFromXml.aspx?id=AJax" title="Ajax" description="" /> <siteMapNode url="MenuFromXml.aspx?id=SQL" title="MS SQL Server 2005" description="" /> <siteMapNode url="MenuFromXml.aspx?id=Javascript" title="JavaScript" description="" /> </siteMapNode> </siteMap>

Categories : Asp Net

ItemType when datasource is datareader
If the DataSource is a DataReader, your ItemType needs to be either a DbDataRecord (which implements IDataRecord) or better, IDataRecord directly. Example (assuming you are getting an Id column back): <asp:Repeater ID="rpt" ItemType="System.Data.IDataRecord" runat="server" > <ItemTemplate> <%# Item.GetInt32(Item.GetOrdinal("Id")) %> </ItemTemplate> </asp:Repeater> But I think the above is probably worse than simply doing Eval or Cast. I can see the benefit when you are binding to a custom business object but not when you are using a DataReader.

Categories : Asp Net

The control DataSource(or DataSourceID) is not set
I tried this and works for me. Here is my code: <div> <fieldset> <legend>Token mode</legend> <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1" EmptyMessage="Please type here" AllowCustomEntry="true" InputType="Token" Width="350"> </telerik:RadAutoCompleteBox> </fieldset> <fieldset> <legend>Token mode</legend> <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox2" EmptyMessage="Please type here" AllowCustomEntry="true" InputType="Token" Width="350"> </telerik:RadAutoCompleteBox> </fieldset> <

Categories : C#

Update Kendo UI Datasource
var dataSource = new kendo.data.DataSource({ //define datasource parameters as per your requirement }); var grid = jQuery("#grid").kendoGrid({ dataSource: dataSource, }); jQuery('#changeevent').change(function() { dataSource.read({ parametername:jQuery("#valueoffeild").val() }); var grid = jQuery("#grid").data("kendoGrid") grid.refresh(); }); Above code pass extra parameter to your url.

Categories : Jquery

DataSource not getting injected in Spring 3
You don't need to initialize the JdbcTemplate in your class. The whole point of an IoC container is to have it do that for you. So add a @Bean method to create it. (Also, don't make your methods static, it's not needed in this case) @Configuration @ComponentScan(basePackages = "the.name.of.your.package") public class DataSourceForClientFund { private static final String driverClassName = CommonConfig.DB_PARAMETERMAP_DRIVER; private static final String url = CommonConfig.DB_PARAMETERMAP_URL; private static final String dbUsername = CommonConfig.DB_PARAMETERMAP_USER; private static final String dbPassword = CommonConfig.DB_PARAMETERMAP_PWD; @Bean public BasicDataSource getDataSource() { BasicDataSource dataSource = new BasicDataSource(); dataSource

Categories : Java

Datagridview should not clear on datasource = nothing
If you are using a Data-Bound DataGridView control, you cannot just simply add new row by using the cell property of the control. A DataGridView that is bound using a DataSet can be access only using the DataSet properties. Forcing it to use the cell property can cause an error "Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound." Adding new row to a DataGridView control programmatically is useful when you want to pull some data from another table to a Bound DataSet with another table. These links may help you : http://social.msdn.microsoft.com/Forums/windows/en-US/c291d580-5a52-422a-b798-fbfb5f799b6a/cannot-add-new-rows-to-a-databound-datagridview-programmatically http://www.codeproject.com/Questions/411452/Add-Rows-To-Databound

Categories : Vb.Net

UITableView Dynamic Datasource
This sounds like a great opportunity to introduce a separate service for managing your network requests instead of embedding that behavior in the middle of your table's datasource. If your datasource were to request that this service try to load the next 50 cells then that service can decide if it should actually start a new network request or not. Let your instance of that service keep track of what requests are in flight and what ranges of index paths they are expected to cover so it can decide when a -shouldLoadItemsStartingAtIndexPath: style message should result in a new network request. Is that the sort of pattern you are looking for or did you have a more specific question about your approach?

Categories : Iphone

vb.net Bind a combobox to a datasource
Hi you can do this code to populate data into combo Try Dim cn As New OleDbConnection cn.ConnectionString = conString cn.Open() cmd.Connection = cn cmd.CommandText = "your query" 'Execte reader function is used to hold more than one value from the table dr = cmd.ExecuteReader() ' Fill a combo box with the datareader Do While dr.Read = True ComboBox1 = dr.Item(0) Loop cn.Close() Catch ex As Exception MsgBox(ex.Message) End Try If you have any more problems don't hesitate to ask.

Categories : Vb.Net

kendo grid with more than one datasource
Create a ViewModel wich contains your three RadioButtons: public class MyViewModel { public int Id {get;set;} public bool Radio1 {get;set;} public bool Radio2 {get;set;} public bool Radio3 {get;set;} } Then fill the ViewModel in your Controller (Customer) and specified Action (GetCustomer) public class CustomerController : Controller { ....... public ActionResult GetCustomer([DataSourceRequest] DataSourceRequest gridRequest) { IList<MyViewModel> myViewModels = new List<MyViewModel>(); //fill ViewModels here from stored Procedures return Json(myViewModels.ToDataSourceResult(gridRequest)); } ........ } Then change your view Code as follows: @(Html.Kendo().Grid<MyViewModel>() .Name("CustomerSearch")

Categories : Asp Net Mvc

Datagridview rows are 0 even though I have a datasource
I wonder why you need a DataGridView without displaying it on the UI in the first place. There are couple of alternates I can suggest Let go the DataGridView and use DataTable/IEnumerable to keep the data. Both can provide you with counts. If you insist on keeping the DataGridView then something like (Assuming its bound to a DataSet) ((DataSet)dataGridView1.DataSource).Tables[0].Rows.Count would also work.

Categories : C#

Access Datasource through the JPA project
The Apache OpenJPA (JPA 1.0) engine is shipped with Websphere 7 (Java EE 5). The classloader by default load the internal OpenJPA implementation. May you need to change the classloader policy. See more in WebSphere Application Server V7: Understanding Class Loaders.

Categories : Java

I cant able to connect the datasource in wso2 bam 2.3.0
Make sure you have correct data-source configuration in <BAM_HOME>/repository/conf/datasources/ master-datasources.xml. It should look similar to the following. And add your jar files in <BAM_HOME>/repository/components/lib folder. <datasource> <name>WSO2BAM_POSTGRESQL</name> <description>The datasource used for registry and user manager</description> <jndiConfig> <name>jdbc/WSO2Bam_Postgresql</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:postgresql://localhost:5432/WSO2Bam_Postgresql</url> <defaultAutoCommit>false</defaultAutoCommit> <use

Categories : Wso2

Multiple datasource config
Actually my defaultDataSource bean was declared in applicationContext.xml whereas my securityDataSource bean was in applicationContext-security.xml, although not declared to be browsed in the web.xml by the contextConfigLocation. Here is the sample code that was changed: <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> To: <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml, /WEB-INF/applicationContext-security.xml</param-value> </context-param> and it works ! The securityDataSource bean that I had seen belonged to another context...

Categories : Java

Configure DataSource from Java (without XML)
As I was working with Spring MVC, I solved it in the following way: @Bean public DriverManagerDataSource getMySQLDriverManagerDatasource(){ DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setPassword("password"); dataSource.setUrl("jdbc:mysql://localhost:3306/mytestdb"); dataSource.setUsername("root"); return dataSource; }

Categories : Mysql

Add row to drop down menu that comes from a datasource?
You need to handle the DataBound event of the dropdown list (which occurs after all of the values from the database have been put into the dropdown list), like this: Markup: <asp:DropDownList ID="searchApplicationDropDown" runat="server" DataSourceID="SqlDataSource8" DataTextField="AppName" DataValueField="PK_Application" OnDataBound="searchApplicationDropDown_DataBound"></asp:DropDownList> Code-behind: protected void searchApplicationDropDown_DataBound(object sender, EventArgs e) { DropDownList list = sender as DropDownList; if (list != null) { list.Items.Insert(0, "--Select One--"); } }

Categories : C#

UTableView DataSource Setup
The problem with this implementation is that you are not getting dequeued cell which will spike your's device memory once you reached up to app's allocated maximum level of memory. On every table row, a new cell is created. Moreover cellForRowIndexPath method gives you flexibility in customising cell based on row index path. What if you are rendering two different custom cell, which contains different views, how can you differentiate between them without using cellForRowIndex delegate's method.

Categories : Iphone

Get all components linked to a datasource
I'm not sure what problem you're trying to solve, because setting the TDataSource.AutoEdit property to False should automatically disable editing in the controls until you manually change the DataSet.State to one of the ones in dsEditModes. With that being said, this will do what you're asking. It uses an accessor class to access the protected DataLinks list in a TDataSource, and then checks to see if it's a TFieldLink and also if it has the ReadOnly property. // No Delphi version provided, so uses "older style" RTTI uses TypInfo, DB, DBCtrls; type THackDataSource=class(TDataSource); // accessor class procedure SetDataSetControlsReadOnly(const DataSource: TDataSource); var i: Integer; DS: THackDataSource; DL: TDataLink; EnableIt: Boolean; begin EnableIt := DataSource.Sta

Categories : Delphi

How to set the datasource of a UITableView in code
'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:' This is what is causing your app to crash. Something in the logic of your tableView:cellForRowAtIndexPath method is keeping a UITableViewCell from being returned. That log message says it all -- A UITableViewCell must be returned from tableView:cellForRowAtIndexPath:.

Categories : IOS

DataGridView DataSource Not Updating
Having you tried the following combination?: myDataGridControl.DataSource = originalTable; myDataGridControl.DataSource = null; myDataGridControl.DataSource = newTable; In my experience, setting the DataSource to null then to the second source does the trick.

Categories : C#



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