?
Solved

Combining bound columns into template columns...

Posted on 2005-04-06
4
Medium Priority
?
260 Views
Last Modified: 2010-04-07
Inide a datagrid I would like to combine multiple columns into a single template column.  My reasoning is that I need to save screen space since I have about 16 columns of data.  I need to get within 800 pixels and I'm currently at about 2000 or so.

These are just simple data bound columns displaying text.

</asp:BoundColumn>
<asp:BoundColumn DataField="CHG_DT" HeaderText="Charge Dt">                              
</asp:BoundColumn>
<asp:BoundColumn DataField="PROC_DT" HeaderText="Process Dt">                              
</asp:BoundColumn>
<asp:BoundColumn DataField="PAY_PD_DT" HeaderText="Pay Pd Dt">


I know this is sort of an open ended question in a way but any ideas and links will be greatly appreciated.

Thanks in advance...
0
Comment
Question by:Weller0123
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
dfaithen earned 2000 total points
ID: 13721260
<asp:datagrid ID="testGrid" Width="100%" CellPadding="3" CellSpacing="0" AutoGenerateColumns="False" Runat="server">
      <columns>
            <asp:templatecolumn>
                  <headertemplate>Charge Dt - Process Dt - Pay Pd Dt</headertemplate>
                  <itemtemplate>
                        <%# DataBinder.Eval(Container.DataItem, "CHG_DT")+" - "+DataBinder.Eval(Container.DataItem, "PROC_DT")+" - "+DataBinder.Eval(Container.DataItem, "PAY_PD_DT") %>
                  </itemtemplate>
            </asp:templatecolumn>
      </columns>
</asp:datagrid>

Hope it helps.
0
 
LVL 1

Expert Comment

by:dfaithen
ID: 13721276
P.S.
you could alweays replace the " - " concatenator with "<br/>". That would enable you to have all three item in the width of one. Just keep in mind this stretches the height of you rows.
0
 

Author Comment

by:Weller0123
ID: 13721651
...kewl.  That should at least help.

Thanks!
0
 
LVL 1

Expert Comment

by:dfaithen
ID: 13721697
Post back if you need any more clarification on this.
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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

807 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