Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Data Binding Gridview using data tables

Posted on 2011-03-03
4
Medium Priority
?
303 Views
Last Modified: 2012-05-11
I have created a form that it compiles data from the user, now, i want to pull the information , but some of the columns i want to bind several columns from the database, so I am lokking a way to create a read only view and accomodate the data,


Is there any other method?
Whatdo I need to accomplish this?
0
Comment
Question by:TonyReba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
Rahul Agarwal earned 2000 total points
ID: 35033535
0
 
LVL 9

Author Comment

by:TonyReba
ID: 35033583
Can I re-use same gridview and code and only change instead of insert select?

 I mean use the same data table and connection string?
0
 
LVL 3

Expert Comment

by:chrisrbloom
ID: 35037173
If you have the gridview based on a datasource, then you can create a template column with the following:

<asp:Label ID="lbl_EmpName" runat="server" text='<%# Container.DataItem("EmployeeName") %>' />, &nbsp;<asp:Label ID="lbl_EmpNumber" runat="server" text='<%# Container.DataItem("EmployeeNumber") %>' />

here's some more information on this:
http://weblogs.asp.net/rajbk/archive/2004/07/20/what-s-the-deal-with-databinder-eval-and-container-dataitem.aspx
0
 
LVL 9

Author Comment

by:TonyReba
ID: 35047679
how can i made a non expandable item template

I don't want the cells and header to increase as the data will be the same size always.->
how can i made this , CSS maybe?
i need this to be the smallest possible as there are nearly 24 columns on the Gridview







0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question