I'm having some trouble with the ReadXmlSchema and ReadXml methods for a DataTable. I'm getting the error "DataTable does not support schema inference from Xml".
Code Snippet:
I've tried
Table.ReadXmlSchema(new StringReader(File.ReadAllText(XsdFilePath)));
Table.ReadXml(new StringReader(File.ReadAllText(XmlFilePath)));
And
Table.Re...
I have the following tables:
Company {CompanyID, CompanyName}
Deal {CompanyID, Value}
And I have a listbox:
<ListBox Name="Deals"
Height="100" Width="420" Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
Visibility="Visible" IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding}" Sel...
Suppose I'm accessing a DataTable from multiple threads. If I want to access a particular row, I suspect I need to lock that operation (I could be mistaken about this, but at least I know this way I'm safe):
// this is a strongly-typed table
OrdersRow row = null;
lock (orderTable.Rows.SyncRoot) {
row = orderTable.FindByOrderId(myOrd...
totally new to jquery and datatable. I would like to add an edit button that call forth a colorbox div that displays all the editable field. can anyone point me in the right direction on how this can be achieved?
I was able to add a sClass to each field and use fnDrawCallback callback to call colorbox from field. But this is kind o...
Hello,
I am writing an ASP.NET 3.5 application and need to send gridview values to a datatable for use in a listbox control as part of a quote process. I have written the following VB code in my Page_Load:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim dtSelParts As DataTable = Ne...
How do I check for time for between. suppose I have Time in string format like "02:00 PM" and I want to check it between two other times. How can I check for this, as the time is in string format ?
The value to be compare with the times is store in DataTable, and I am using the Select function of the datatable.
...
Hi, I'm still learning (baby steps). Messing about with a function and hoping to find a tidier way to deal with my datatables.
For the more commonly used tables throughout the life of the program, I'll dump them to datatables and query those instead. What I'm hoping to do is query the datatables for say column x = "this", and convert th...
I am using the following code to read my csv file:
public DataTable ParseCSV(string path)
{
if (!File.Exists(path))
return null;
string full = Path.GetFullPath(path);
string file = Path.GetFileName(full);
string dir = Path.GetDirectoryName(full);
//create the "database" connectio...
How can I improve this code? What has made this long winded is the fact that I can't use string.IsNullOrEmpty on a data row and instead I have to use a dr.IsHOUSENUMBERNull method AND the string.IsNullOrEmpty to check if it is empty. Why is this? The column in the database is sometimes empty and sometimes NULL.
I'm sure this can be w...
Hi there,
I'm working on a shopping cart in ASP.NET 3.5 in Visual Studio 2008, and I've defined the cart object using a typed datatable in my dataset file. This is great as I can setup and edit the table schema visually which is nice.
On the cart page I want to drop a gridview to show the contents of the cart datatable which is held in...
Is it fine to have the DAL return a DTO type from the Domain model vs just returning a DataTable? Isn't is looser to have your DAL functions return DataTables/DataSets and have your BLL map the data to business objects?
...
I have a number of static classes that contain tables like this:
using System;
using System.Data;
using System.Globalization;
public static class TableFoo
{
private static readonly DataTable ItemTable;
static TableFoo()
{
ItemTable = new DataTable("TableFoo") { Locale = CultureInfo.InvariantCulture };
ItemT...
Hey all,
First off, im using a checkbox to highlight a true or false value from a dataset which I want to be able to change it. Unfortunately databinding the DataTable to the GridView checkboxes doesnt work (as you probably know) as it requires it to be in "edit" mode.
The way I've gotten round this is having the checkbox reading the d...
I have the following code that serializes a DataTable to XML.
StringWriter sw = new StringWriter();
myDataTable.WriteXml(sw);
And this works, however, the serialized XML looks like this:
<NameOfTable>
<NameOfTable>
<ID>1</ID>
<Name>Jack</Name>
</NameOfTable>
<NameOfTable>
<ID>2</ID>
<Name>F...
I have a ice:datatable with ice:rowSelector.
In each row there's a button.
The click on the button should not trigger the rowSelector so I thought I could use toggleOnInput="true" but it does not work...event with this property set the table row is de/selected on button click. Any workarounds?
<ice:rowSelector value="#{item.selected}"...
Filter AdoQuery_1 Record
SQL.Add('SELECT * from Med');
SQL.Add('Where Cliente Like ''%'+Edit1.text );
and
update AdoQuery_1 from AdoQuery_2 (master)
Update record´s of Table1 from Table2 (chield)
Update record´s of Table3 from Table4 (chield)
is there a faster way to update the selected record and do the sam...
Hello,
I know, that it is possible to filter dataTable Control on client as it is shown in this exaple:
http://developer.yahoo.com/yui/examples/datatable/dt_localfilter.html
Is it also possible to filter more columns? I'd like to have 2 textfields, and when I type sth to the first one, DataTable would filter according to the 'areacod...
I am getting a JS error and what to know what it means and how to solve it. (JS noob here)
Error: "tId is not defined"
Line of JS with error: "if (s[i].sInstance = tId) { "
More Information
I am using the Data Table (http://datatables.net) jQuery plugin.
I have a two tables with a class of "dataTable" loaded on a page (inside of jQ...
Hi,
I want to deactivate cell editor on this datatable column when an event is fired
{key:"QComUv", label:"Qte com (UV)", formatter:QComUvFormatter,
editor:"textbox",className:"textInput", sortable:true}
I tried
mydatatable.destroyCellEditor();
but I dont got what I want
Any idea please
Thanks,
...
My current project is to take information from an OleDbDatabase and .CSV files and place it all into a larger OleDbDatabase.
I have currently read in all the information I need from both .CSV files, and the OleDbDatabase into DataTables.... Where it is getting hairy is writing all of the information back to another OleDbDatabase.
Right...