|
Odds are you have a network connection or server configuration issue. Hard to say, even if I saw the code, just because the server doesn't work for me, doesn't mean it shouldn't work for you.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am using datagridview in my form and it is bound to a datatable.I have a add button on the form which added a new row in the datatable.Now what I want is that when user click on the add button it should the cursor should go to the new added row.
For example if there are more than 20 items in the grid view and user click add button then it will be added at the last but it does not scroll to the last row.
How can I solve this problem?
Thanks in advance
|
|
|
|
|
Isn't there a SetFocus method you can apply on the currently selected row? If so, you get the index of the newly added row and do a SetFocus on it.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Thanks for reply.It does get the focus on the last row but if the last row is now visible in the gridview then the gridview should scroll to the focused row.
|
|
|
|
|
I am using Replace function to replace the occurance of a double Quote (") in a string. But it shows me error. Can anyone suggest how to achieve that. The code i am using is as given :
DocStr = Replace(DocStr, """, "``", 0, , )
Here I want to replace the " with ``.
Please Help. Thanks in advance.
Sekhar
|
|
|
|
|
As oppose to using """ try using the character code(34). As """ causes a problem (i presume) as " is part of the syntax syntax.
e.g.
docstr = replace(docstr,chrw(34),"``",0,,)
modified on Saturday, January 19, 2008 7:40:16 AM
|
|
|
|
|
You use double quotation marks to put a quotation mark in a string:
DocStr = Replace(DocStr, """", "``", 0, , )
But why are you replacing the quotation marks with something that looks similar to a quotation mark? I seems like you are trying to circumvent some characters because you don't know how to handle them correctly.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Yes I want to replace the double quotes from a string that I have retrieved. How can i replace the double quotes from a string using the replace() function.
Please Help.
Sekhar
|
|
|
|
|
Eh...? You didn't read my previous post, you just replied to it anyway?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
hello there,
i have 2 nested datalist, and i cant call the inner one.
i just want to access its' controls (textbox, ets) from the code behind.
Here is the aspx page and followed by the aspx.vb page:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="testing.aspx.vb" Inherits="testing" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script language="javascript" type="text/javascript">
// <!CDATA[
// ]]>
</script>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:bschutzConnectionString %>"
SelectCommand="SELECT [fold_id], [folder_name], [commid] FROM [folders]"></asp:SqlDataSource>
<asp:DataList ID="DataList1" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84"
BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" DataSourceID="SqlDataSource1"
GridLines="Both" Width="527px">
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<ItemTemplate>
<table id="TABLE1" onclick="return TABLE1_onclick()">
<tr>
<td style="width: 100px; height: 21px;">
folder Id:&nbsp;</td>
<td style="width: 291px; height: 21px;">
<asp:Label ID="fold_idLabel" runat="server" Text='<%# Eval("fold_id") %>'></asp:Label></td>
<td style="width: 410px; height: 21px;">
</td>
</tr>
<tr>
<td style="width: 100px; text-align: left;">
folder Name:</td>
<td style="width: 291px">
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Eval("folder_name", "{0}") %>' OnClick="LinkButton1_Click"></asp:LinkButton></td>
<td style="width: 410px; text-align: right;">
<asp:LinkButton ID="LinkButton2" Text="Edit" CommandName= "Edit" runat="server"></asp:LinkButton></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 291px">
</td>
<td style="width: 410px">
</td>
</tr>
</table>
<br />
<asp:DataList ID="DataList2" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan"
BorderWidth="1px" CellPadding="2" DataKeyField="id" DataSourceID="SqlDataSource1"
ForeColor="Black" Width="821px">
<FooterStyle BackColor="Tan" />
<SelectedItemStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<ItemTemplate>
&nbsp;<br />
<table>
<tr>
<td style="width: 100px">
foled id:</td>
<td style="width: 100px">
<asp:Label ID="folidLabel" runat="server" Text='<%# Eval("folid") %>'></asp:Label></td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 100px">
File Id:&nbsp;
</td>
<td style="width: 100px">
<asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>'></asp:Label></td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 100px">
File Subject:
</td>
<td style="width: 100px">
<asp:Label ID="subjectLabel" runat="server" Text='<%# Eval("subject") %>'></asp:Label></td>
<td style="width: 100px">
</td>
</tr>
</table>
<br />
<br />
<br />
</ItemTemplate>
<AlternatingItemStyle BackColor="PaleGoldenrod" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
</asp:DataList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:bschutzConnectionString %>"
SelectCommand="SELECT [folid], [id], [subject] FROM [minutes] WHERE ([folid] = @folid)">
<SelectParameters>
<asp:ControlParameter ControlID="HiddenField1" Name="folid" PropertyName="Value"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("fold_id", "{0}") %>' />
<br />
</ItemTemplate>
<ItemStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<EditItemTemplate>
<table>
<tr>
<td style="width: 100px; height: 21px">
Folder Name</td>
<td style="width: 100px; height: 21px">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("folder_name", "{0}") %>'></asp:TextBox></td>
<td style="width: 100px; height: 21px">
<asp:LinkButton ID="LinkButton3" Text="cancel" CommandName="Cancel" runat="server"></asp:LinkButton></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
</table>
</EditItemTemplate>
</asp:DataList>&nbsp;
</asp:Content>
this is the ASPX.VB
Partial Class testing
Inherits System.Web.UI.Page
Protected Sub DataList1_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList1.EditCommand
DataList1.SelectedIndex = e.Item.ItemIndex
DataList1.EditItemIndex = e.Item.ItemIndex
DataList1.DataBind()
End Sub
Protected Sub DataList1_CancelCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList1.CancelCommand
DataList1.SelectedIndex = -1
DataList1.EditItemIndex = -1
DataList1.DataBind()
End Sub
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dtl2 As DataListItem = (DataList1.FindControl("Datalist2"))
dtl2.Visible = False
End Sub
End Class
the ERROR page
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 18: Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Line 19: Dim dtl2 As DataListItem = (DataList1.FindControl("Datalist2"))
Line 20: dtl2.Visible = False
Line 21: End Sub
Line 22: End Class
Thanks in advance
Edward Topalian
|
|
|
|
|
Hello there i got the Answer to this question.\
it is:
Dim but As LinkButton = sender ' linkbutton that i'm calling from.
Dim sl1 As DataListItem = but.NamingContainer
sl1.FindControl("DataList2").Visible = False
'Datalist2 is the child datalist.
'so this way i can call anyitem in the chinld datalist
|
|
|
|
|
Hi all,
I'm Beginner in VB .Net,now i'm havng 10 Forms in my project
named as form1,form2,form3 etc,.
How to change the name of that form,and wat r the changes, we need to do ,if we change the name of a form,,
Any one plz help me in this regard,,,,
Thanks in advance
Saravana...
|
|
|
|
|
In the solution explorer click on the form and then click it again (like windows explorer) so that you can rename it. When You rename the file it should automatically rename the form class itself. Compile after each rename to ensure that the application still compiles. If the application doesn't compile then the form renaming process won't work properly.
|
|
|
|
|
Hi Friend,
Colin is right, another thing is to buy a Book in Introduction to Vb.net, i thik you are starting Programming in VB.NT you dont have never developed in vb6, but buy a book and google for vb.net free e-books. it will help you.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Please help!!
How can i preview single/multipage images on a form?
|
|
|
|
|
I have a Combo Box control and during runtime I want to remove some of the Items in it according some conditions. How can I achieve this ?
I wrote the code for this
ComboBox1.Items.Remove(Index)
ComboBox1.Refresh()
But this doesnt works and still the item is there after running the code.
Could anybody please suggest what is the correct code.
Thanks.
|
|
|
|
|
use this property
combobox1.items.clear()
might it work
|
|
|
|
|
Thanks Ravi for your reply.
The code you have supplied clears all the items in the ComboBox. I wanted to remove a particular item depending on the condition i have. I found the correct code for this and it is :
ComboBox1.Items.RemoveAt(index)
Thanks for your response.
Sekhar
|
|
|
|
|
Can you you halp me wiht my assignment???..
1. Create a folder that i
can rename, delete, save and delete images
vashstampede
|
|
|
|
|
System.IO.Directory.CreateDirectory("c:\RTFM")
|
|
|
|
|
Ashfield wrote: System.IO.Directory.CreateDirectory("c:\RTFM")
Read This Fine Message?
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
"SOS!" help...... Please give me codes on how to connect an image scanner??
|
|
|
|
|
how can i give the expiration date in my visual studio setup and deployment project which is build in vb.net
|
|
|
|
|
Explain in Detail what you want to do
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I have a DataGridView control in a PC Project. I want tooltips to appear in the cells of a specific column...these tooltips will be different for each row. I currently using this code:
dgvMyGrid.ShowCellToolTips = True
dgvMyGrid.Columns("MyColumn").ToolTipText = "Test HeaderCell Tooltip"
For Each dgvr As DataGridViewRow In dgvMyGrid.Rows
dgvr.Cells("MyColumn").ToolTipText = "Test Cell Tooltip " & dgvr.Index
Next
I am able to see the Test HeaderCell Tooltip when I hover over the headercell in the column, but the tooltips in the cells of the grid are not showing up. Is there another setting I'm missing or something? Anyone got any ideas?
|
|
|
|