Search results for query: *

  1. H

    Question How to import Excel worksheet to DataGridView keeping cell colors

    100 columns * 400 rows shouldn't take too long.. I think your only option is to loop through the table to colour them in. Maybe use a background worker thread to do this.
  2. H

    Regular expression in windows form?

    Hi there. You didn't look hard enought ;) Dim myRegEx As New System.Text.RegularExpressions.Regex("^?{10}$") If myRegEx.IsMatch(txtBox.text) Then ' Is ok Else ' Is not ok End If I haven't tried this but thats the general idea of it.
  3. H

    Sorting a DataView

    FYI, Me.dsAffichage.Tables("Formulaire").DefaultView.Table.Rows Is referring to the underlying datatable its the same as Me.dsAffichage.Tables("Formulaire").Rows So that proves nothing... Put a breakpoint at For each dr in Me.dsAffichage.Tables("Formulaire").DefaultView.Table.Rows. When...
  4. H

    Install a program that uses database (mySQL)

    use the dotnet connector... Include the connector dll with the installation (this should happen automatically if you have referenced the dll. Is it a central database?
  5. H

    Question Class Inheritance

    Just think about it logically.... spend most of your time on the design. Have routines in your classes to load and save the data. Load the data when you load your form... you can use a binding source to bind the data to textboxes etc good luck
  6. H

    Question Class Inheritance

    send it to me if you like... I won't get a chance to look at it until after the weekend though.
  7. H

    Question Class Inheritance

    ps if this is going to be a big system, notepad isn't going to cut it. I would look into a database. MSAccess,MySQL,MSSql or Oracle are the main choices with different pros and cons (which would take too long for me to go into). There are whole websites dedicated to these.. MySQL is free and...
  8. H

    Question Class Inheritance

    Check out this article, it does a good job of explaining it. http://www.devcity.net/net/files/articles/class_design_inheritance.pdf
  9. H

    Problem With ASP 2.0 Web App (Session? I think not)

    Do you use a class for your users? If so, are you creating a new instance when you get a new user logging on? You should do this in your global.asax file.
  10. H

    navbar help

    try If cell.value.ToString = "" Then allowAdd = False
  11. H

    Question Class Inheritance

    No problem at all. Have you managed to inherit employee class into your other classes yet? Its really simple. Public Class clsSalesStaff Inherits clsEmployee Public ReadOnly Property Salary() As Decimal ' Get info for calculating salary Return BasicPay + Commission End Property...
  12. H

    navbar help

    Sorry, I hadn't checked any of that code.... try this maybe: For Each row As DataGridViewRow In Grid.Rows For Each cell As DataGridViewCell In row.Cells If cell.value = "" Then allowAdd = False Next Next
  13. H

    navbar help

    All you need to do is pass in a ref to the gridview and the number of rows.... The function needs to go into a module and it must be public. Public Function AddRow(ByRef Grid As DataGridView, ByVal MinimumRows As Integer) As Boolean Dim allowAdd as Boolean = True For Each row As...
  14. H

    Question Class Inheritance

    You gave very little information.. If it was me, I would have clsEmployee inherit clsPerson.. If salaries are calculated different, thats fine.. in clsEmployee you have a property 'role or type' which has values: ss,os and cs (use enum). You also have a property salary and commission...
  15. H

    navbar help

    Yes, you can also use row.columns(1), row.columns(2) etc. (I think its a zero based array).. You can also loop through the columns: Dim allowAdd as Boolean = True For Each row As DataGridViewRow in DataGridView1.Rows For Each col As DataGridViewColumn in row.Columns if col.value...
  16. H

    navbar help

    The way I understand it is you have 3 rows that must be filled in before you allow your user to add anymore rows... You can use that function to make sure all fields are filled in... if you want to make sure there are at least 3 rows, use: If DataGridview1.rows.count >= 3 And AllowUpdate Then...
  17. H

    navbar help

    No, it doesn't have to be in a function.. Dim returnValue as Boolean = True For Each row As DataGridViewRow in DataGridView1.Rows If row.Cells("ColumnName").Value = "" and row.Cells("AnotherColumn").Value = "" Then returnValue = False End If Next If returnValue then '...
  18. H

    navbar help

    Loop through the grid rows before adding the new row. Maybe something like this Private Function AllowUpdate() as Boolean Dim returnValue as Boolean = True For Each row As DataGridViewRow in DataGridView1.Rows If row.Cells("ColumnName").Value = "" and row.Cells("AnotherColumn").Value =...
  19. H

    Retrieving from 'Checked ListBox'

    You have a checkedItems collection in the checkedlistbox. You can loop through the collection and save items etc... e.g for i as Integer = 0 to CheckedListBox1.CheckedItems.Count - 1 Debug.Print(CheckedListBox1.CheckedItems(i).ToString) next
  20. H

    HTTPWebRequest to php upload

    Thanks, That code also dug me out of a hole :D
Back
Top