|
Thank you Mark, I will try changing the session variables thing later, once I get this to work.
How can I check if the dataset returned is empty or not. Can you plz help me with the code for it?
|
|
|
|
|
And once when I find that the result set is empty, I must fill the grid with a custom message.
Can you please help me how.
|
|
|
|
|
dreddy7 wrote: Can you plz help me with the code for it?
No. A little research on your own will be more valuable then giving you the code. I'll give you a hint though. How many rows are there in a DataTable?
only two letters away from being an asset
|
|
|
|
|
I am using a dataset not a data table. So, I am not knowing how to count the rows in a dataset
|
|
|
|
|
dreddy7 wrote: I am using a dataset not a data table.
Stop what you're doing and read the documentations on DataSet before posting again.
only two letters away from being an asset
|
|
|
|
|
Uff......finally....I got it! and thats so simple...I am new to this coding world...so was confused between tables/datasets/adapters and stuff..
Anyways the code is as simple as:
<br />
selectText = "select format from Formats where numberID='" + num + "' and format <> 'Other'"<br />
Dim cmdFormat As SqlDataAdapter = New SqlDataAdapter(selectText, sqlConn1)<br />
<br />
cmdFormat.Fill(dsFormat, "Formats")<br />
<br />
tableFormat = dsFormat.Tables("Formats")<br />
tblFormatsCount = tableFormat.Rows.Count<br />
make the label visible to display the custom text message<br />
lblNoFormat.Visible = True <br />
End If<br />
Session("Formats") = dsFormat<br />
<br />
<br />
dtGrid_Format.DataSource = dsFormat.Tables("Formats")<br />
|
|
|
|
|
Congratulations! Now you have learned something, rather then being told.
only two letters away from being an asset
|
|
|
|
|
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");
|
|
|
|