- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 25
- Posts with Upvotes
- 24
- Upvoting Members
- 18
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Final Year Bachelors Student of NEDUET Karachi, Pakistan. Microsoft Certified Professional for .Net framework 2.0. Mostly self taught programmer who just love to code.I can be contacted by:eng.shahan@hotmail.com but I won't solve any question "personally".
- Interests
- Favorite Games: Basket Ball, Cricket, Football. Favorite Foods: Nuts, Chocolate Chip, Chocolate and…
- PC Specs
- As a contributor in these forums: DaniWeb Contributor Experts-Exchange Contributor MSDN Contributor…
Re: Your form2 code should be like this: [CODE]Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.userTableAdapter.Fill(Me.myDataSet.user) Me.DataGridView1.DataSource = Me.myDataSet.user ' Bind grid with table Me.DataGridView1.Refresh() End Sub[/CODE] | |
Re: Hi! Check this: [CODE] Private Sub DataGridView1_CellEndEdit(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit If (e.ColumnIndex = 0) Then ' Checking numeric value for Column1 only Dim value As String = DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString() For Each c As Char In value If Not Char.IsDigit(c) Then MessageBox.Show("Please enter numeric value.") DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value … | |
Re: @inderneel Lets say you have two forms: Form1 and Form2. You called Form2 from Form1 like this: Form2 frm=new Form2(); frm.ShowDialog(); My question is are you willing to exit the Application from Form2 ??? Try: [B]Environment.Exit(0); [/B] The exit method terminates the PROCESS and your form(s) lies under the same … | |
Re: Hi! Please check this: [CODE] List<string> Col1 = new List<string>(); List<string> Col2 = new List<string>(); DataGridView1.AllowUserToAddRows = false; //removes last(Extra) row foreach (DataGridViewRow row in DataGridView1.Rows) { Col1.Add(row.Cells(0).Value.ToString); Col2.Add(row.Cells(1).Value.ToString); } DataGridView1.AllowUserToAddRows = true; //add row again If addition of rows allowed. [/CODE] | |
Re: Try using the below sample code: ' iterate on all pages of tab control For Each page As TabPage In TabControl1.TabPages ' picked GroupBox controls only in a separate variable ' to aviod evaluation each time during loop Dim grpBoxes() As GroupBox = page.Controls.OfType(Of GroupBox)() For Each grpBox As GroupBox … | |
Re: I would recommend you store the country code in your table as well in front of country name(or in a separate table and link them). Your life will be easier. Just fetch the country code from the table corresponding to the country name. | |
| Re: You need to check two things here: 1. This path **should exist**. 2. You have **permission** to access the location. Since it seems to a location of a server/Domain directory. |
Re: From your question my understanding is that you have saved your data in database through form 1 and you want to see the updates on form2. In form2, you need to use SqlCommand, SqlConnection and SqlDataApadter classes and an instance of DataTable. See the example below: (untested, but give you … | |
Re: AFAIK, you are using TYPED dataset. What you need to do is, in the table inside you dataset, you need to perform a check with the username you take as an input from user and if it exists display an error message. On the other hand insert an entry in … | |
Re: Can you post the error message you received ? It will help us to figure out the problem. | |
Re: Hi! The error you are receiving, appears when for example we do not initialize an object and try to access one of its property so in this case the the object does not exists so we can not access its property. I have a couple of questions and few guidelines … | |
Re: This can be the [startup](http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.customformat.aspx): While [this](http://www.vbdotnetheaven.com/uploadfile/mahesh/vb-net-datetimepicker/) one also seems useful. | |
Re: You can setup your query to pick 15 challans and fill a datatable. Pass this datatable to crystal report's datasource. Thats it...! | |
Re: Hi! Could you please provide more detail ? As you said: [QUOTE]Instead of deleteing I want my code to be ammended to set curprice = curPrice(intCurrentData)[/QUOTE] You want to update 'CurPrice' but in your DELETE query it is doing a different thing, no sigh of 'curprice' manipulation etc... Can please … | |
Re: This could be a direct hit: [URL="http://www.vbdotnetheaven.com/UploadFile/mahesh/AccessMySqlDatabase04252005015856AM/AccessMySqlDatabase.aspx"]http://www.vbdotnetheaven.com/UploadFile/mahesh/AccessMySqlDatabase04252005015856AM/AccessMySqlDatabase.aspx[/URL] For an alternative: [URL="http://dev.mysql.com/tech-resources/articles/ebonat-load-and-search-mysql-data-using-vbnet-2005.html"]http://dev.mysql.com/tech-resources/articles/ebonat-load-and-search-mysql-data-using-vbnet-2005.html[/URL] Check this if gone through the above two: [URL="http://www.codeproject.com/KB/vb/VBnet_to_mySQL_Server.aspx"]http://www.codeproject.com/KB/vb/VBnet_to_mySQL_Server.aspx[/URL] | |
Re: This will generate a checkbox column in your datagridview: [CODE] Dim chkBoxCol As New DataGridViewCheckBoxColumn DataGridView1.Columns.Add(chkBoxCol) [/CODE] Is this what was required ?? then by looping through all the checkboxes you can set value(s) accordingly. | |
Re: When you execute your "command" use ExecuteScalar() method to accomplish the task. You should do like this: [CODE] 'Define your OleConnection, connectionstring etc.. Dim cmd as OleDBCommand(........) 'pass connectionstring,connection object etc Dim AffectedRecords as Integer = cmd.ExecuteScalar() If(AffectedRecords>0)then ' if condition match there is some record added. ' Display your … | |
Re: Hi! You can append "NewLine" character at the end of each line as demonstrated in the sample, and use it with Write() and TrimEnd() method, Run this code in a separate project you will see a file at location "C:\abc.txt" [CODE] Sub Main() Dim user() As String = {"item1", "item2", … | |
Re: Hi! One way as I see: Use this funtion: [CODE] Public Function LoadNewQuestion(ByVal QuestionNumber As Integer) As DataRow Dim row As DataRow = VBtestasDataSet.Questions.Rows(QuestionNumber) 'You will find Rows() method under "Table" of "DataSet" Return row End Function[/CODE] and on every "Next" button click call: LoadNewQuestion(0) LoadNewQuestion(1) LoadNewQuestion(2) . . . … | |
Re: Hi! Here is the vb.net code: [CODE] Dim text As String = IO.File.ReadAllText("YouPathOfFile") Dim bytearray() As Byte = Encoding.ASCII.GetBytes(text.ToCharArray()) Dim Hex As String = String.Empty For Each b As Byte In bytearray Hex &= Convert.ToString(b, 16) Next System.Diagnostics.Debug.Print(Hex) 'see result in "Output window"[/CODE] and here is the link for verification … | |
Re: Hi! You should go through this link: [URL="http://www.codeproject.com/KB/webforms/Editable_GridView.aspx"]http://www.codeproject.com/KB/webforms/Editable_GridView.aspx[/URL] In the link you should consider these parts: [CODE]<asp:GridView ID="grdContact" runat="server" AutoGenerateColumns="False" DataKeyNames="Id, Type" OnRowCancelingEdit="grdContact_RowCancelingEdit" OnRowDataBound="grdContact_RowDataBound" [B] OnRowEditing="grdContact_RowEditing" [/B] OnRowUpdating="grdContact_RowUpdating" ShowFooter="True" OnRowCommand="grdContact_RowCommand" OnRowDeleting="grdContact_RowDeleting">[/CODE] and this one also: [code]<asp:TemplateField HeaderText="Name" HeaderStyle-HorizontalAlign="Left"> <EditItemTemplate> <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox> </EditItemTemplate> <FooterTemplate> <asp:TextBox ID="txtNewName" runat="server" … | |
| Re: Hi! Change line 34 like this: [CODE] RichTextBox1.Text = myStreamReader.ReadToEnd()[/CODE] You need to use "Text" property instead of "Rtf". |
Re: Hi! Have a look at this code: [CODE] Dim dt As DateTime = DateTimePicker1.Value.AddDays(-1)[/CODE] | |
Re: Hi! Have a look at this code a well: [CODE] Dim d As Decimal = 52496874654 d = CDbl(d.ToString().Substring(0, 3))[/CODE] | |
Re: Hi! GeekByChoiCe's approach is correct. But I want you to don't only use the suggestion, you should go first to this link, where some other related information is also covered for your better understanding: [URL="http://msdn.microsoft.com/en-us/library/c7ykbedk.aspx"]http://msdn.microsoft.com/en-us/library/c7ykbedk.aspx[/URL] | |
Re: Hi! There are couples of scenarios discussed in this link, I would recommend you to go through this as well: [URL="http://msdn.microsoft.com/en-us/library/cd8yh918.aspx"]http://msdn.microsoft.com/en-us/library/cd8yh918.aspx[/URL] | |
Re: Hi! As you have been asked for: [QUOTE]how can i learn it ???What book should i refer??any tutorials????[/QUOTE] I would recommend you to go through [URL="http://msdn.microsoft.com"]msdn.microsoft.com[/URL] and search about that topic. For example: I want to know the methods and properties supported by ArrayList so have a look at this: … | |
Re: Hi! At line 41 of your code, you have: [CODE] With Me[/CODE] it should be: [CODE] With lstview[/CODE] | |
Re: Hi! to writing faster in an excel sheet you need A Fast bulk copy Method: See this heading in the link "A "Fast Bulk-Copy" Method" : [URL="http://www.codeproject.com/KB/office/FastExcelExporting.aspx"]http://www.codeproject.com/KB/office/FastExcelExporting.aspx[/URL] | |
Re: Hi! Your this line: [CODE]frmEstimateMenu.Show(intX)[/CODE] should be: [CODE]frmEstimate.Show(intX)[/CODE] I believe there is a typing mistake... Also, This should be amend as well: [CODE]Public Overloads Sub Show(ByRef x As integer) y=x MyBase.Show() '' To leave the Show() feature of the form intact. end sub[/CODE] |