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

Top 5 Contributors of the Month
Post New Web Links

WPF Creating a Table

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :WPF

Hi All ,

Am doing a wpf application..

I have a button and i want to create a table by clicking on that button. And the table should be like that there itself the user can insert column names and data also

first it may come with 1 or 2 rows and after entering into last row it should create 1 more row automatically

how can i do this ??

if u have any examples or links or suggestion please provide me...

Thanks in advance.

View Complete Post

More Related Resource Links

Cutting Edge: Creating a Multi-table DataGrid in ASP.NET


If you bind a multi-table DataSet to a DataGrid, only the first table is recognized. Here Dino Esposito writes a custom solution the the multi-table problem.

Dino Esposito

MSDN Magazine August 2003

Creating a table-valued function on a user defined type in SQL Server CLR

We would like to be able to create a table-valued function on a user defined type.  We would like the syntax in SQL to look like it works for the XML nodes function:   DECLARE @myXml XML = '<a><b>1</b><b>2</b><b>3</b></a>' ; SELECT  node.query('text()') FROM    @myXml.nodes('a/b') nodes (node) ;   In other words, in the FROM clause, we can access the "nodes" method of the xml variable and it returns a rowset. Thanks!

Help creating HTML table from dataTable when every nth dataTable row = 1 html table row... C#

Hello, Im trying to create an html table from data that is in a dataTable but Im having trouble coming up with the right logic. Every 3 rows in the dataTable needs to be 1 row in the html table.  Ive tried using foreach through the datatable with a modulus to determin every third dataTable row but i still run into snags because i am building the table using objects rather than using concatenated strings..(example TableRow tr = new TableRow  etc...). I cant add the cells to the rows when the row is only created in an if statement etc. Can someone post a good example in c# of how they would achieve this. The amount of data in the dataTable could change from time to time so the code cant rely on a pre determined size, unless you just need the total rows and columns, that can be dtermined when the dataTable is filled from the sqlDataReader. <table><tr><td>dataTable row 1 values</td><td>ataTable row 2 values</td><td>dataTable row 3 values</td></tr> <tr><td>dataTable row 4 values</td><td>dataTable row 5 values</td><td>dataTable row 6 values</td></tr>   Any help and example would be great. Ive been able to do similar tables in other apps but thats only when I use concatenated text strings to build the html table. Im trying to stay away from that this time

Creating table with database data, ASP.net and C#

Hi!I just started with my first ASP.net page with C# and I want to create a dynamic table with information from my database. I have connected to the database to the page with datareader, so that is solved. The problem is making the table and import the data into the different rows and columns. I also want the possibility to edit and remove this information from the table. Its supposed to be a table with information about customers.I have no idea whats the best solution for this and I hope you guys got information or links that show how to do this?Regards,fh01

Creating a Form say grid sort of a interface where in data values will be extracted from the table 4


how dis can be done help please with simple button click and changing the values it can be done but how to move columns with data in graceful manner the way we have in calendar control... 

Creating Table of consecutive dates


I'm trying to create a table with one field (SmallDate&Time)

I want this table to have consecutive dates beginning roughly 01/01/2008

through 12/31/2013.

I think I need a Stored procedure to do this but am not sure.

It may even be doable from an SQL Query.

Any help would be appreciated.









Can a table name impact generating the service client when creating Service Reference?


I have a new WCF service I'm writing under VS2010 and IIS 7.5.  The service includes a table named Client.

When I built my test class and added the service reference, the first test was confirming the creation of the client.

My service reference did not generate any client that I could call .Open on!!!! I was wondering if it is due to that table name???

 Edited to add that I tested the service through the browser and it brings up the page and XAML fine.

Thanks for any assistance!

Creating table records with foreign key constraints/Separate controllers?


I have multiple tables that are all linked back to a central table with foreign keys. I want to be able to create a new record in table 2, but I'm having trouble because I don't know how to create a new instance of table 2's record while referencing the ID of the record it will be tied to.


creating custom table in share point database in sqlserver is fine ?


we are creating custom table in share point database in sqlserver.

is it fine to create custom table?

are we violating any rule  because of the creation of custom table ?

does share point recommended to create custom table  ?

Help needed with creating Pdf table out of list of dataSets


Hey there,

I'm trying to create a pdf table using data from a list of datasets.

Each dataset may contain 0 to 4 rows as follows, and the data within that dataset is specific to a particular month:


CommunicationType         CommunicationCount
email                                           20
letter                                           10
phone                                           5
fax                             &n

creating sql table from code c#


Hello i want that site manager will create his own tables in the Database in 2 steps!!! the first one is to create table in the database the user can choose the name of the new table by textbox and the table get only one ID column:

SqlConnection newCon = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            String st = "CREATE TABLE DataBaseConn.dbo." + tableName.Text.Trim()
                + "(contactId INTEGER PRIMARY KEY IDENTITY)";
            SqlCommand newCmd = new SqlCommand(st, newCon);

in the next step i want the user will add/insert the columns to the table (one column each time) the user will have textbox for the column name, drop down list with few kind of data type (datetime, int, varchar) and after press button the column will add to the table. ANY IDEA?????

Creating Table from DataSet


Hello all,

Real simple one here.  I'd like to create a table on my Page from a DataSet.  It looks like I have it working properly, but what I'd like to do is interpret the columns, as well as be selective with which column to display.

            Dim dc As DataColumn
            Dim dr As DataRow

            For Each dr In ds.Tables(0).Rows

                Dim trow As New TableRow

                For Each dc In ds.Tables(0).Columns

                    Dim tcell As New TableCell

                    tcell.Controls.Add(New LiteralControl(dr(dc.ColumnName).ToString))



I would like specific columns, by name or position doesnt matter.

So if a column is = named column, then addcell

and also, the data needs to be interpreted: If value of column = x then response.write("y")

In sum, I dont want all the columns, just specific ones, then I was to interpret whats in that cell, and write something.

For Each dc In ds.Tables(0).Columns

Creating indexed view from the table which has no index?



Can we create indexed view from the base table which has no index?

This is because i don't want any indexes in my base table but for better query performance i want in view..

Please suggest..

Thanks in advance,


What is the difference performance wise in creating a temp table using declare @table table or creat



I have a query that is taking forever to run on the production server.

Do you see a reason why will it take forever to insert it to a temp table... If i put my query in a cte it works fine...

This procedure was using a table variable and i changed it to a temp table but it didnt help performance wise

I found out that when i just do the select statement it works the same amount of time that cte takes but when it inserts it a temp table (around 75 rows) it takes forever.

Any help will be appreciated.



Problem with creating table by procedure


I have code like this

CREATE PROCEDURE prc_CreateDrawsMatrixTable (
	@GameName nvarchar(64),
	@Numbers int=0)
	IF @Numbers<1 
	DECLARE @Command nvarchar(4000)
	SET @Command='CREATE TABLE [dbo].[tblDrawsMatrix_'+@GameName+'] [Index] [int] IDENTITY(1,1) NOT NULL,
				 [DrawIndex] [int] NOT NULL,[DrawDate] [date] NOT NULL,'
	DECLARE @Counter int=1
	WHILE @Counter<=@Numbers 
			SET @Command=@Command + '[L' + LTRIM(STR(@Counter)) + '] [SMALLINT] NULL DEFAULT(0)'
			IF @Counter<@Numbers 

Transactional Replication - Creating Snapshot after adding a new table




Sorry for my English..


Could you tell me if it is possible not to create entire snapshot after adding a new table? Our database is very big and it takes a lot of time to make snapshot.


Also could someone tell me exactly how works blocking of tables while creating snapshot?

I've read in BOL that if Snapshot Replication is used then all tables are blocked while creating snapshot for replication. And if Transactional Replication is used, snapshot is created in parallel mode and tables are not blocked and users can work with them. I understand that in second case each table is blocked while it is processing and after processing it is unblocked and next table is blocked. Is it so?


Also I am interested how actually tables are blocked? For SELECT/UPDATE/INSERT or how? Where can I read information about it?




creating Employee Dim table in northwind


would someone help with here please...

I'm creating an Employee dim table combining employee, EmployeeTerritories, Terriritories, and Region tables. I'm my SSIS OLE DB Destination, i get an error "Failure inserting into read-only EmployeeID" yet my table has no constraints at all.

Thank you people,


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