|
Hello,
Thanks for reading this post. Here is my issue. I have a datagrid which 5 bound columns(3 of which are not visible) and 1 button column. Column 1 is date of operation, column 2 is text of email sent by my company etc. My issue is i want to display the entire content of the email text(which can be 2000 characters) inside the cell and have a scroll bar inside the cell, so the page does not become too big. For each row i would like to see the Date, The text of the email and if it exceeds the height of the row, then have a scroll bar within the email text column. How can I do that ?? All help is most appreciated !! This is what i have now.
<asp:DataGrid ID="dgMessages" runat="server" CssClass="table_results" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Width="80%" GridLines=Horizontal AlternatingItemStyle-BackColor="gainsboro" HeaderStyle-Font-Underline="False"
HeaderStyle-CssClass="table_results_header2" AlternatingItemStyle-CssClass="table_results_altrow" PageSize="5" CellPadding="1" CellSpacing="2" OnPageIndexChanged="dgMessages_PageChanger" OnItemCommand="Button_Click">
<HeaderStyle Font-Bold="True" Wrap="False" CssClass="table_results_header2" Font-Underline="False"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="MESSAGE_DATE" HeaderText="Email Sent" SortExpression="MESSAGE_DATE" >
<ItemStyle Width="10%" />
</asp:BoundColumn>
<asp:BoundColumn DataField="MESSAGE_TEXT" HeaderText="Email Text" SortExpression="MESSAGE_TEXT" >
<ItemStyle Font-Bold="False" Height="10px" Wrap=true Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" VerticalAlign="Top" Width="25%" />
<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" VerticalAlign="Top" />
</asp:BoundColumn>
<asp:BoundColumn DataField="RECORD_ID" Visible=False />
<asp:BoundColumn DataField="PARENT_RECORD_ID" Visible=False />
<asp:BoundColumn DataField="CUSTOMER_ID" Visible=False />
<asp:ButtonColumn ButtonType="PushButton" Text="Reply" />
</Columns>
<PagerStyle Mode="NumericPages" HorizontalAlign=Right></PagerStyle>
<AlternatingItemStyle BackColor="Gainsboro" CssClass="table_results_altrow" />
</asp:DataGrid>
|
|
|
|
|
I think the best you can sensibly do is change the message_text column to a templatecolumn and place a readonly, multiline textbox in there and set it's value to the database field. You will get greyed out scrollbars if the text is short but that can't be helped. You can use css stylesheet to try and make the textbox blend in with the grid background as much as possible.
(I'm not really sure sorting by message_text will produce anything sensible either - you'd be better off leaving that out. Not even sur you can if it corresponds to a text (as opposed to varchar) database field...)
|
|
|
|
|
Thank you...I think that works fine. I created a template column and added a div with overflow property set to auto. That ensured whenever length or width went beyond, it would add scroll bars. works great. Thanks
|
|
|
|
|
I haven't been able to "move" my aspx form into my tab control. I am using master pages with the Ajax tab control on a content page. Has anyone done this or does anyone have a link to some sample code?
|
|
|
|
|
Hi all,
I have a array of treeview, and i want to display that array on GridView that each row of GridView is a treeview.
Ex :
+ John Details
- Age : 12
- Sex : Male
+ Peter Details
- Age : 14
- Sex : Male
+ Jes Details
- Age : 15
- Sex : Female
........
Like display QA in this website.
How could i do that?
-- modified at 11:36 Tuesday 18th September, 2007
|
|
|
|
|
Well - my first suggestion would be to check the title of the forum. It's ASP.NET. You want the Hardware forum.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
As a matter of fact , I am in the form I was intended to be. You see, I was developing an asp.net application which uses a POS terminal for reading magnetic cards and smart cards. I have a vega9000 type POS terminal and I am really stuck.. I was hoping that , any other person who came across with this problem..Maybe some other framework , some other terminal , some other way to sole my problem.. So.. any more suggestions?
Revelation 22:13
|
|
|
|
|
Hi Guys,
I have the sesstion id concatenated to the address line when i load a my
asp.net application pages:
http://Analyzer2/(S21g12siel2gh3o20bhm3dp45)/Menus/ANL_MainMenu.aspx
Does anybody know how to get rid of it?
Cheers.
|
|
|
|
|
Do you have:
cookieless="true"
in your web.config file? (Session State section)
Unless you especially want this, try setting it to "false".
|
|
|
|
|
Great. It worked.
But when i set cookieless to false does that mean that my web applicaiton
is using cookies ('cause i've got a direct order from my client not to use cookies)?
-- modified at 10:58 Tuesday 18th September, 2007
|
|
|
|
|
well, (assuming you aren't using/setting any cookies of your own) it will still set a so-called per-session cookie to hold the session-id that you were seeing in the url. Such a cookie is not written to the client hard disk but only held in memory and is destroyed when the user next shuts his/her browser down.
This may or may not satisfy your client - if not, you will have to return to the cookieless state and put up with the session-id in the url as before.
Chances are your client won't know about per-session cookies, so you could always try not mentioning it! Otherwise, explain to them that the server has to have some way of knowing which page request is coming from which user, and the randomly generated session-id that it passess back and forth with each request is how it does so.
Fred
|
|
|
|
|
The process cannot access the file 'C:\Inetpub\wwwroot\ralph.pdf' because it is being used by another process.
and the file is just being created.
what should I do?
BiG RaLpH
|
|
|
|
|
If you've tried creating it before (previous test run maybe) perhaps the process then didn't end properly. Try restarting IIS, checking the processes in Windows task manager (crtl+alt+del) or you may need to do a complete re-boot.
Make sure your code catches any erros and closes down ecerything it needs to before trying again.
|
|
|
|
|
It sounds like the process that creates the PDF isn't closing file handles properly. You need to ensure that the PDF writing stream is closed before you try to use it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
how can I make sure that the writing stream is closed?
BiG RaLpH
|
|
|
|
|
In a web application is it necessary to programmatically code for all the buttons(export,print.etc) that exists on crystal report viewer? Why if so?
|
|
|
|
|
Hi All,
I have a calender control on my ASP.Net page.The value of the calender control gives date and time.However i want only the date with out the time.
Calander1.selecteddate; ---- returns both date and time
How will i get the date only?
Thanks
|
|
|
|
|
try this:
Calander1.SelectedDate.ToString("dd/MM/yyyy");
|
|
|
|
|
|
A quick search on this site reveals this[^] blog engine by Marc Clifton.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Hi,
I have to retrieve data from Active directory and bind that to a dropdown list control.Can any one help me to do the function.
Thanks in advance.
Babu
|
|
|
|
|
It's not binding but here it goes:
You should replace these lines with the proper values
entry.Path = "GC://****";
entry.Username = txtUN.Text;
entry.Password = txtPW.Text;
DirectoryEntry entry = new DirectoryEntry();
entry.Path = "GC://****";
entry.Username = txtUN.Text;
entry.Password = txtPW.Text;
DirectorySearcher ds = new DirectorySearcher(entry);
ds.Filter = txtQuery.Text;
ds.CacheResults = false;
ds.SearchScope = SearchScope.Subtree;
foreach (string s in cols)
ds.PropertiesToLoad.Add(s);
src = ds.FindAll();
cbResults.Items.Clear();
for (int i = 0; i < src.Count; i++)
{
if (src[i].GetDirectoryEntry().Properties["mail"].Value != null)
cbResults.Items.Add(src[i].GetDirectoryEntry().Properties["mail"].Value);
else
cbResults.Items.Add(i);
}
private string[] cols =
{
"displayName",
"givenName",
"sn",
"ou",
"employeeType",
"mail",
"telephoneNumber",
"samAccountNumber",
"whenCreated",
"whenChanged",
"objectGUID",
"c",
"objectCategory",
"anr",
"otherTelephone",
"cn",
"badPwdCount",
"lockoutTime",
"pwdLastSet",
"lastLogon",
"mobile",
"Profile",
"LastLogin",
"MaxStorage",
"PasswordAge",
"Description",
};
|
|
|
|
|
Hi,
I am currently building a web application whereby translation is being catered by resource files. For some reasons, it is required that each web page in the site have it own resource files. Thus, for a given page, page say "PageTest", there will be two resource files "PageTest.en-gb.resx" and "PageTest.fr-fr.resx" (provided that only two languages are defined for the time being). This process extends to all pages in the site. I store all the resource files in single folder such that i have :
Resources\Page1Test.en-gb.resx
Resources\Page1Test.fr-fr.resx
Resources\Page2Test.en-gb.resx
Resources\Page2Test.fr-fr.resx
etc....
Visual Studio nicely builds two DLL (satellite assemblies) in the bin folder of my application as follows :
bin\en-gb\Web.Resources.DLL --> This folder contains all resources files in english (ie. Resources\Page1Test.en-gb.resx , Resources\Page2Test.en-gb.resx etc..)
bin\fr-fr\Web.Resources.DLL --> This folder contains all resources files in french (ie. Resources\Page1Test.fr-fr.resx , Resources\Page2Test.fr-fr.resx)
So far so good. The problem here is that i have no idea how to reference a specific resource found in a specific resource file of the satellite assembly.
Clearly speaking,
How can i distinguish between en-gb\Web.Resources.DLL --> Page1Test."Resource_key" and en-gb\Web.Resources.DLL --> Page2Test."Resource_key" where "Resource_key" is a simple key to retrieve a string?
Can you please help me on this point? Thank you.
|
|
|
|
|
" i have no idea how to reference a specific resource found in a specific resource file of the satellite assembly."
You don't need to. The framework will access the proper resource file for the language being used, all you need to do is reference the resource key.
only two letters away from being an asset
|
|
|
|