Jump to content
Xtreme .Net Talk

MarkItZero

Avatar/Signature
  • Posts

    43
  • Joined

  • Last visited

About MarkItZero

  • Birthday 03/11/1978

Personal Information

  • Visual Studio .NET Version
    pro
  • .NET Preferred Language
    vb.net

MarkItZero's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am surprised that none of the grids offer the ability to copy and paste records. That would seem like a very common request. I am guessing that to code it myself I would somehow have to capture the current row of the grid into a datarow. Given my poor coding skills, this should be quite an adventure.
  2. Hello, I have been having quite a bit of trouble with Microsoft's datagrid. I am now thinking that it would be more economical to purchase a 3rd party grid. I have been looking around and have found several grids but so far have not found one that incorporates all of the features that I need. Perhaps this would be a good place to discuss the benefits and downsides of the numerous grids available. The features that I need for my project include... 1. Combobox column type that allows me to display a description from a 2nd table based upon the foriegn key value from the main table (valuemember, displaymember) 2. The ability to right-click and copy and paste rows similar to excel and access. 3. The ability to somewhat easily validate the data as it is entered onto the grid. I am hoping to get away with spending $500 or less. Thanks in advance for any suggestions!
  3. Hello, I will admit that I am a lousy VB.Net programmer, but when the boss says get it done, it seems I dont have much choice. I am creating a windows program using data from an Access database. I thought my best bet would be to use datagrids on my form for inserting, editing and deleting data from the tables. When I used the datagrid wizard to create my form I expected I would find a lot of the same functionality that I would find if I just opened the table in Access. Sadly this is not the case. I especially wanted to be able to copy and paste rows just like I would in Access or Excel. But I have no idea where to start. I also need to find a way to add combo boxes to my datagrid. Lastly, I have added a checkbox column to the datagrid, but it is behaving strangely. Sometimes when I click the box, nothing happens. Other times I will click the box and a dim grey check mark will appear instead of the usual bold black mark. This is the code that I used to set my datagrid properties everything else on the form was generated by the wizard... 'Set Datagrid Properties 'New Table Style Dim TSeditEquip As New DataGridTableStyle 'Table Style Properties With TSeditEquip .MappingName = "Equipment" End With 'Declare Each Column of DG Dim col1 As New DataGridTextBoxColumn Dim col2 As New DataGridTextBoxColumn Dim col3 As New DataGridTextBoxColumn Dim col4 As New DataGridBoolColumn 'Column Properties With col1 .HeaderText = "Equip Code" .MappingName = "EquipCode" .Width = 100 .TextBox.MaxLength = 15 .NullText = String.Empty End With With col2 .HeaderText = "Type" .MappingName = "EquipType" .Width = 150 End With With col3 .HeaderText = "Description" .MappingName = "Description" .Width = 250 .TextBox.MaxLength = 25 .NullText = String.Empty End With With col4 .HeaderText = "Inactive" .MappingName = "Inactive" .Width = 60 End With 'Add Columns to DataStyle TSeditEquip.GridColumnStyles.AddRange(New DataGridColumnStyle() {col1, col2, col3, col4}) 'Add DataStyle to DG grdEquipment.TableStyles.Add(TSeditEquip) Any suggestions for any of my problems would be greatly appreciated. Thanks!
  4. Ok, that wasnt what I wanted to hear. So I will just forget you even said it! :p
  5. Hello, I think I made a big mistake. I have a .net program which I distributed out to several users on my network. I just gave them the .exe file to run. I kept the solution files on my machine and continued to edit them. Unfortunately I didnt keep a copy of the solution files to the program that they have. I have made about a week's worth of changes to the program and now I realize that I want to go back to the older version. Does anyone have any idea how I can do this without having to spend hours pouring through code attempting to undo all of my changes? Thanks in advance.
  6. Thank you very much! I will test it out.
  7. I am kind of stumped right now and I am hoping for some ideas. Here is the situation. I created a windows program to manage the dispatching of our delivery drivers. The program uses an Access database to hold the data. Each day the users will enter several new dispatch entries on the DispatchDetails form. They are also able to view existing entries on this same form. Included on the form are combo boxes containing information such as DriverName, Truck, Trailer# and LoadSize. Here is the code is use to populate the CmboDriver 'Clear Dataset DsDetDrivers1.Clear() 'Fill Dataset OleDbDataAdapter8.Fill(DsDetDrivers1, "Drivers") 'Datarow Dim DRDriver As DataRow 'Declare Array Dim ArryDriver As ArrayList = New ArrayList() 'Fill Array For Each DRDriver In DsDetDrivers1.Tables("Drivers").Rows If DRDriver("Inactive") <> True Then ArryDriver.Add(New LookupItem(DRDriver("DriverID"), DRDriver("DriverName").ToString())) End If Next 'Bind and Show Cmbo Box CmboDriver.DataSource = ArryDriver CmboDriver.DisplayMember = "Text" CmboDriver.ValueMember = "ID" CmboDriver.DropDownStyle = ComboBoxStyle.DropDownList CmboDriver.Show() CmboDriver.SelectedValue = DRDispatchDetails("DriverID") The code for the other combo boxes are essentially identical. As you can see, I check the Inactive field in the driver table to make sure I only display active drivers in the combo box. That way a user will be unable to select an inactive driver for a new entry. However, because users can open, view and edit existing entries, I need to be able to display the drivers name even if the driver has since been inatcivated. So, I guess what I need is to find a way to check to see if my driver is inactive, and if he is, then I need to populate the combobox with all of the active drivers + the current driver. Sorry for the long post. I hope that makes sense. And ideas will be greatly appreciated. Thanks!
  8. Hello, I have a main form which contains a listview, datetimepicker and a "Change Date" button. When the form is displayed, the listview is populated with datarows from the database based upon the selected date from the datetimepicker. When the user clicks the "Change Date" button a small popup form is displayed which allows the user to select a new date and update the database with this value. When the user clicks "Save" on the popup form, the date is saved and the popup closes. I would like to add a command to the "Save" procedure on the popup form which will cause the listview on the main form to refresh with the new values in the database. I am not exactly sure how to go about this. Hopefully that makes sense. Thank you!
  9. Here is the system generated code for the Update Query... ' 'OleDbUpdateCommand1 ' Me.OleDbUpdateCommand1.CommandText = "UPDATE Tickets SET Name = ?, [Time] = ? WHERE (ID = ?) AND (Name = ? OR ? IS NULL" & _ " AND Name IS NULL) AND ([Time] = ? OR ? IS NULL AND [Time] IS NULL)" Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1 Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Name", System.Data.OleDb.OleDbType.VarWChar, 50, "Name")) Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Time", System.Data.OleDb.OleDbType.DBDate, 0, "Time")) Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "ID", System.Data.DataRowVersion.Original, Nothing)) Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Name", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Name", System.Data.DataRowVersion.Original, Nothing)) Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Name1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Name", System.Data.DataRowVersion.Original, Nothing)) Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Time", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Time", System.Data.DataRowVersion.Original, Nothing)) Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Time1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Time", System.Data.DataRowVersion.Original, Nothing)) Here is my update data procedure... 'Update Data Sub UpdateData() 'Clear DataSets DsTickets1.Clear() 'Fill DataSet OleDbDataAdapter1.Fill(DsTickets1, "Tickets") 'DataRow Dim DRTicket As DataRow = DsTickets1.Tables("Tickets").Rows.Find(ID) 'Set New Values DRTicket("Name") = txtName.Text 'Update DataSet OleDbDataAdapter1.Update(DsTickets1, "Tickets") End Sub I would use a text field instead of a time field, but later on in the program I want to be able to the calculate time differences between tickets. I suppose I could force the user to enter the time in a specified format which would allow me to convert it to an integer for the calculations. I may have to do that if I cant figure this problem out.
  10. To explain further... I have an Access table "Tickets" with to 3 fields (ID, Name, Time). Tickets ID - Autonumber Name - Text Time - Date/Time Sample Data 20 - Johnson - 1/1/04 11:00am 21 - Brown - 1/1/04 3:00pm The date portion of the Time field is insignificant to me, however, since there is no time-only data type, having the date in the field wont hurt anything. On my form, I display the Name in a text box based upon an ID passed from another form. I have a Save button that allows the user to save any changes they make to the name field. I am not attempting to read, display, update or do anything with the Time field on this form. If the Time value of the record I am updating is set to 12:00am (no matter what the date), then the code works fine. But, if the Time value is anything else (12:01am, 11:00pm..) there will be an error whenever the user clicks the Save button. exception of type 'System.Data.DBConcurrencyException' occurred in system.data.dll Additional information: Concurrency violation: the UpdateCommand affected 0 records. I am totally baffled. Any suggestions? Thanks.
  11. Hello, I have an Access database with a Date/Time field that I use to store time values (8:00am, 9:00pm etc). I have no problem displaying the value on my form, however when I attempt to update any of the fields from the the table, I receive an error.... An unhandled exception of type 'System.Data.DBConcurrencyException' occurred in system.data.dll Additional information: Concurrency violation: the UpdateCommand affected 0 records. I am almost positive that the error is being caused by this date/time field. If I remove the field from the table and refresh my datasets in the program, I can display and update without any problems. If I keep the date/time field in the table and populate it with a full date like 03/11/04, I can also display and update without any problems. However, as soon as I enter a time into the field, it begins to give me that error when I try to update the dataset (even though I am not even trying to update that field). Here is the code I use for displaying and updating.. 'Display Data Sub DisplayData () 'Clear DataSets DstsTicket1.Clear() 'Fill DataSet OleDbDataAdapter1.Fill(DstsTicket1, "Ticket") 'DataRow Dim DRTSTicket As DataRow = DstsTicket1.Tables("Ticket").Rows.Find(ID) 'Fill textbox txtName.Text = DRTSTicket("Name") End Sub 'Update Data Sub UpdateData () 'Clear DataSets DstsTicket1.Clear() 'Fill DataSet OleDbDataAdapter1.Fill(DstsTicket1, "Ticket") 'DataRow Dim DRTSTicket As DataRow = DstsTicket1.Tables("Ticket").Rows.Find(ID) 'Set New Values DRTSTicket("Name") = txtName.Text 'Update DataSet OleDbDataAdapter1.Update(DstsTicket1, "Ticket") End Sub What could I be doing wrong? And why does this problem only occur when I place time values (8:00am) in the table? Sorry this was such a long question! Please Help! Thanks!
  12. Hello, I have VB.net Standard edition. I would like to sure Crystal for my reporting needs; however, it seems that you need VB.net Proffesional to get the CR functionality. Perhaps someone here would know... Is it possible to use Crystal Reports with VB.net Standard if I have a full working version of Crystal Reports 8.5? And if so, how would I go about inserting the crystal viewer into my program? Thanks!
  13. Do you think that the Academic version would work?
  14. Damn. I wish there was a way to work around that. I already have a whole bunch of nicely designed Cyrstal Reports and it is a shame not to be able to use them with my program.
  15. Is it possible to use CR with the standard version of VB.net? I was under the impression that you needed Professional to get CR functionality.
×
×
  • Create New...