Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

ssbelfast

@ssbelfast
About
Posts
30
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using SelectedIndex to determine if an item was selected
    S ssbelfast

    can't get this to work The drop down list is populated when the program is run ( by reading in records from a table) I add a new item with text ' ' and value = '1 but when I step through the code, the first item always has an index = 0 even though I've just set it to -1 Don't understand how to change this Even if no item is selected, the index is = 0 which means if no item is selected, the first item will always be selected

    ASP.NET help database question

  • changing the header on a datagrid
    S ssbelfast

    Howdy I have an arraylist that I bind to a datagrid and display on a webpage On the webpage, the header on the datagrid has a column header of ITEM I'm trying to change this display the correct name, but can't figure it out. I've looked at examples for tablespace and it seems complicated and I'd need major rewrites in the program Seems like I ought to be able to set something in the properties field - like 'Collections" - this has a bound columns property with header text - but I can't figure out what to put for 'data field' - program keeps blowing up on this Thanks

    ASP.NET

  • Problem with Expression validator for text box input
    S ssbelfast

    I'm using a 'regular expression validator' to valid use input on a text box I have two different web pages that use the same validation expression criteria for two different text boxes; one of them works, the other does not work. I dont understand why The field is 3 alpha characters followed by 3 numeric. Doesn't matter if they are caps or small letters I use \w{3} to signify alpha and \d{3} to signify numeric. It works on one page ( adding a new record ) but on another page ( view existing records) it only works if I turn cap locks on for alph and turn it off for numeric and even then it is not consistent Any thoughts? Thanks

    Visual Basic regex help question discussion

  • using SelectedIndex to determine if an item was selected
    S ssbelfast

    great - thanks for the idea

    ASP.NET help database question

  • using SelectedIndex to determine if an item was selected
    S ssbelfast

    I'm using the selectedIndex of a drop down list to determine if the user select an item If dropdownlistMember.SelectedIndex > -1 do a bunch of stuff else send an error message to the user Its a zero based drop down list The problem is that SelectedIndex is never -1. If I step through the code, when the user does not make a selection, the index is 0. If they select the first item, the index is 0 ( it should be) If they select the second item, index is 1 ( it should be) I tried initializing the index during page load if not post back If Page.IsPostBack = False Then dlIdNums.SelectedIndex = -1 But index is always 0 Any ideas? thanks

    ASP.NET help database question

  • comparing values on fields in arraylists
    S ssbelfast

    Steve got it working ,great thanks for all your help (also Steve)

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    I'm thinking actually to create two sets of data one in arraylists and one in arrays, sounds like a bad design, but there are things that I can only figure out how to do in an arraylist and things I can only figure out how to do in an array Anyway, if I do this, my problem is solved, I can make it work this way thanks

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    I've tried various combinations setting = to a string, using Cstr, referencing field, not referencing field I've also tried copying to a array using copyto and setting an specific row = to a specific row in an array, but nothing works My compare logic works for arrays, if I could figure out how to copy the arralyist to an array I would do the compare there

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    thanks but these are arraylists, not arrays so yes the data rows look like this +-----------+ +-----------+ | StrList1 | | StrList2 | +-----------+ +-----------+ | 0 | Jenny | | 0 | Jenny | | 1 | Fred | | 1 | Fred | | 2 | Sony | | 2 | Rudy | | 3 | Marti | | 3 | Marti | | 4 | Rudy | | 4 | Sony | +-----------+ +-----------+ And yes, I want to count the number of times the second value in each row matches, i;e Jenny = Jenny 1, Fred = Fred 2, Sony not = Rudy etc But arraylists are one dimensional Okay, no problem I think because 0 Jenny is still = 0 Jenny; i;e; if I have 0 Jenny and 1 Jenny, it's not a match, its only a match when every thing in the datarow is the same So I tried this with the arraylist, assuming a one dimensional arraylist Dim RowIdx() As Integer = {} For r As Integer = 0 To 9 If arraylist1(r) = arraylist2(r) Then Dim x As Integer = RowIdx.GetUpperBound(0) ReDim RowIdx(x + 1) Dim y As Integer = RowIdx.GetUpperBound(0) RowIdx(y) = i End If Next but I get the same error message I've been getting all lone Operator is not valid for type ( field name) I've had the logic working for arrays, but the program uses arraylists I've tried copying the arraylist to an array, but it doesn't work

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    I should not need to increment 'r' the for - next structure does that the count is a count of the number of times the two rows match, dimmed before the for next statement but when I try to run this I get a message Operator is not valid for type

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    I tried For r As Integer = 0 To 9 If arraylist1.Item(r) = arralist2.Item(r) Then count = count + 1 End If Next but still get this message "Operator is not valid for type "

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    I want to see if the value at a given index in one array is the same as the value at the same index in a different array, I don't need to know what the value is, just want to see if the values are the same

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    I tried to create one dimensional arrays and copy me arraylists to arrays so that I could do the compare in the arrays, but can't get that to work either, maybe its because my one dimensional arrays have two fields Dim tempArray1 As Array = Array.CreateInstance(GetType(String), 10) Dim tempArray2 As Array = Array.CreateInstance(GetType(String), 10) Arraylist1.CopyTo(tempArray1) Arraylist2.CopyTo(tempArray2) always get this message At least one element in the source array could not be cast down to the destination array type

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    so how can I do something like this with an arraylist there are actually two fields on each row, I understand what you said about only one dimension, in this case if the first field is the one each array, the 2nd field will be the say, so I can just compare the entire row but when I try something like If StrArraylist(q) = StrArraylist(j) Then do something I get a message 'Operator is not valid for type 'field name' I thought this meant to try == instead of = , but this wouldn't compile thanks

    Visual Basic question

  • comparing values on fields in arraylists
    S ssbelfast

    I need to compare the value of a field in a row on an arraylist with the value of a field on a second arraylist I have this bit of code working for arrays but cant get it working for arraylists The second argument here (1) represents the second field in the row, with arraylists I get a message saying to many arguments. Can I do this with arraylists or do I need to copy the arraylists to arrays? Thanks For q As Integer = 0 To 9 For j As Integer = 0 To 9 If StrArray1(q, 1) = StrArray2(j, 1) Then count = count + 1 End If Next Next Thanks

    Visual Basic question

  • finding/comparing values in arraylists
    S ssbelfast

    I'm not understanding whats needed for object type my arrays have two fields in each record; ID number and name, both are strings. Also the only extention that the system lets me put after my arraylist name is .GetType (objectType)firstArr(0)).GetType

    ASP.NET question

  • finding/comparing values in arraylists
    S ssbelfast

    I have two arraylists, each record in each arraylist has the same 2 fields Any ideas what I could code to see if the value of a field in a given row in one arraylist is the same as the value of a field in a row in the the other arraylist?

    ASP.NET question

  • message boxes in ASP .NET forms
    S ssbelfast

    thanks

    Visual Basic csharp asp-net visual-studio winforms question

  • message boxes in ASP .NET forms
    S ssbelfast

    Can message boxes ( pop up boxes) be used within ASP.net forms? The info I found visual studio says they are SYSTEM.OBJECTS , I tried inherits SYSTEM.OBJECTS but still get a not declared message Is this something that can only be used in Windows forms? Is there something similar for ASP or VB classes? Thanks

    Visual Basic csharp asp-net visual-studio winforms question

  • Formatting data using a data grid
    S ssbelfast

    Does anyone have an examples/ideas about how to format data using a datagrid in VB Net - maybe its not possible to do this with a simple data grid My data comes from two tables w multiple records for the same id number and name. I don't want to keep repeating id and name fields It comes out like this in the datagrid: ID1 Name1 data group1 (several fields) ID1 Name1 data group2 (several fields) ID1 Name1 data group3 (several fields) ID1 Name1 data group4 (several fields) ID1 Name1 data group5 (several fields) ID2 Name2 data group1 (several fields) ID2 Name2 data group2 (several fields) etc I'd want to look something like this: ID1 Name1 data group1 (several fields) data group2 (several fields) data group3 (fields) etc ID2 Name2 data group1 (several fields) data group2 (several fields) data group3 (fields) etc ID3 Name3 data group1 (several fields) data group2 (several fields) data group3 (fields) etc OR maybe like this ID1 Name1 data group1 data group 2 data group 3 data group 4 etc ID2 Name 2 data group1 data group 2 data group 3 data group 4 etc Thanks

    Visual Basic css tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups