.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Can a .sql file be bind into a datagrid or something else in WPF?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :JQuery

I am making a program, and want to add a .sql file to it.

And don't really know what I am doing to be honest.

Any help would be great



View Complete Post

More Related Resource Links

How to bind datagrid columns to external (main) datacontext?



I have a datagrid and his columns binds well to its collection data. But when I add a new data column (ie. DataGridTextColumn or DataGridComboBoxColumn) and Bind to the main Data Context of window the data are missing (dont show)

In this sample, The last two columns of DataGrid dont bind to the main data.

<Window x:Class="MainWindow"





I need help please : how do i bind dataGrid to dataTable Programmatically ?


Hi all,


please i need to know if i could  bind dataGrid to dataTable Programmatically using wpf V.S 2010 (without using Xaml code)???


i google it before but i saw solution using (DataSet) and this not useful for me because its huge application.

Note : data source is MySql.


Thanks a lot .


Abed Salem

How add and bind DataGrid columns programmatically ??


Hi all,


How are you ??


please i need to know how to add and bind DataGrid columns programmatically ( NOT IN XAML),

i was using  this code in windowsForms i need equivalent for it in WPF please :

            DataGridViewColumn column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "DataPropertyName";
            column.Name = "columnName";
            column.DisplayIndex = 1;
            column.Width = 150;
            column.ReadOnly = true;
            column.Visible = true;


help me please , Thanks a lot .....






Download a file with datagrid



I know this is a newbie question...

I have this code:

                <asp:HyperLinkField HeaderText="Detalhes" Text="mais..."
                    DataNavigateUrlFields="C_FicheiroConsulta" DataNavigateUrlFormatString="{0}" />

But it's not doing what I want :(((

C_FicheiroConsulta is a field of a Table where it has the Full Path to a PDF file.

I want to click on the HyperlinkField and this action will save the file in User PC. Anu help is welcome

Thank you,


Bind ComboBox in DataGrid row



I want to bind ComboBox to database table (via ADO.NET Entity Framework) and put it in DataGrid. Now I have DataGrid with binded TextBlock, but when I try to bind ComboBox it doesn't work.


I have table with list if countries and table users, where each user has foreign key of country where he lives.

I want to show in DataGrid user details like:

Alex Gorr     Canada     al.gorr@email.yo


And when I click on country field I want to see ComboBox with list of countries from table countries.

How can I do it?


Is there a way to export a datagrid to an Excel or html format file?

Hi all.. thanks for taking the time to help in advance!! :)

I've written a win application that has a datagrid which displays certain contents from a database, is there a way to allow the user to export the contents of that datagrid to maybe an excel file or html file so they can print it out themselves? I've done a lot of googling and most i could find were for web applications and not winform.. can someone point me in the right direction?

Thanks very much guys! :)

Is it possible to bind a xaml control's image source directly from the resource file ?


Hi all


Is it possible to bind a xaml control's image source directly from the resource file ?




how can bind file pdf in gridview


i hava a tow server the frist server name webserver and the second name is a file server

the frist server is public and hava a real IP but the second is an internal network

then i want some linkbutton when user click it open file in the second server (file server )

how can make it with secure

How to bind dropdown list with XML file in asp.net?

In this article I'm going to explain how to bind dropdown list with xml file. Binding dropdown list with values from database is common requirement; sometime we may have a requirement like binding the xml file with dropdown list

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Use Jquery with repeater, gridview, datagrid

Before we talk about jquery inside any itemtemplate (repeater, gridview, datagrid), we need to understand the basic use of jquery functions

ListBox tricky to set in a DataGrid/GridView

Listboxes are very tricky to set selected items in grid - there is no real nice way to do it. It would have been great if Microsoft included a property that accepts an array or comma separated values - or anything! But they only allow each item in the list to be selected individually. The way to do this in a grid is a bit messy, but it is fairly simple to implement. When a row is created (as per the event), select the items of the listbox as per the datagrid source data:

How to highlight datagrid or GridView row on mouse over?

This article will show how you can Ajax with GridView to display popup messages when mouse moves over certain column. In the demo project I have added first column as an image column with a help icon in it. This kind of implements a feature that if you want more information about the row you can move mouse over this icon, a asynchronous request is sent to server for data about that row and when call returns the returned message is show as a popup message.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend