473,320 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how can I get data dynamically for two fields in one cell

1
how can I get data dynamically for two fields in one cell?
Expand|Select|Wrap|Line Numbers
  1. <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False">
  2.             <Columns>
  3.             <asp:TemplateField>
  4.             <ItemTemplate>
  5.                 <asp:Image >
  6.                 </asp:image>
  7.  
  8.             </ItemTemplate>
  9.  
  10.             </asp:TemplateField>
  11.                 <asp:TemplateField>
  12.                     <ItemTemplate>
  13.                         <table border="0">
  14.                             <tr>
  15.                                 <td>
  16.                                     <%#Eval("FirstName") %>
  17.                                 </td>
  18.                             </tr>
  19.                             <tr>
  20.                                 <td>
  21.                                     <%#Eval("LastName") %>
  22.                                 </td>
  23.                             </tr>
  24.                         </table>
  25.                     </ItemTemplate>
  26.                 </asp:TemplateField>
  27.  
  28.             </Columns>
  29.         </asp:GridView>
Feb 10 '13 #1
1 1434
Frinavale
9,735 Expert Mod 8TB
Just put them there.

Like this:
Expand|Select|Wrap|Line Numbers
  1. <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False">
  2.   <Columns>
  3.     <asp:TemplateField>
  4.             <ItemTemplate>
  5.                 <asp:Image >
  6.                 </asp:image>
  7.  
  8.             </ItemTemplate>
  9.  
  10.             </asp:TemplateField>
  11.                 <asp:TemplateField>
  12.                     <ItemTemplate>
  13.                         <table border="0">
  14.                             <tr>
  15.                                 <td>
  16.                                     <%#Eval("FirstName") %>
  17.                                     <%#Eval("LastName") %>
  18.                                 </td>
  19.                             </tr>
  20.                         </table>
  21.                     </ItemTemplate>
  22.     </asp:TemplateField>
  23.  
  24.   </Columns>
  25.  </asp:GridView>
-Frinny
Feb 11 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Mike L | last post by:
This is for a Win form. In a datagrid, I want to be able to extract a cell, and parse out the data in the cell. The cell has a telephone number, and I'm able to get the full telephone number. ...
1
by: adi busu via DotNetMonster.com | last post by:
Hi I need an event that could help me to update the datagrid current cell data every time it is changed. i tried with currentCellChanged but when i leave the datagrid this event does not occure...
0
by: Gregg | last post by:
I'm having a problem dynamically appling cell text values in a table. The problem occurs when I try to set the cell text value in any cell other than the first cell of the frist row in the table....
1
by: r_mun | last post by:
Hello, I think it would be an interesting issue to everyone. What I'd like to do is simply change the style of my dynamically created table cell. I have written the following code to...
2
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi, I've bind a grdiview to a database and it's working fine. but what I want to do is if the data in certain cell exceed the cell width the that cell will only show the words with some dots...
9
by: karenjfrancis | last post by:
I have 4 Access databases, all with the same data model but different data. I want to build a front end that brings all of the data in the 4 databases together into one. Assuming my table of...
3
nirmalsingh
by: nirmalsingh | last post by:
hai all, How to place a control dynamically in cell of datagridview control?in run time. i am using C#.net(Windows application) thanx in advance with Cheers Nirmal
5
by: Dan Tallent | last post by:
I have a scenerio when my forms are first opened that the user cannot modify the data. The fields are disabled to prevent them from modifying any of the data. If a user wishes to modify the...
1
by: rmmiller44 | last post by:
I have a web page with an HTML dropdown box where users select from among various cities, e.g. Atlanta, New York, Los Angeles, etc. The desired output is a table and charts with data for that city. ...
0
by: Neo Belgium | last post by:
I know I can add data to a cell in excel using oSheet.Cells = "Text"; but how can I check which cell contains a value like 12/04/2011 ? Basically it will be in column A to search for and add...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.