|
I'm having a problem in Access and a ListBox. I have a ListBox, with multiple columns, filled with information from a table where each row represents a record. I also have a regular form where you can ,with Access built in interface, browse through all records. The idea is that when a user double clicks a row in the ListBox the "details form" opens with the correct record showing. This should be quite simple but I can't for the life of me access the value of the bound column in the ListBox, which I of course want to use in my OpenForm WHERE-statement. Does anyone know how to do this?
|
# ¿ Sep 2, 2011 13:27 |
|
|
# ¿ Apr 28, 2024 18:03 |
|
You can also pass the list with the ViewBag, but that's not really a good practice. I recently learned MVC 4 and at first I used the drop down list helper and the ViewBag but I have now moved on to jQuery.
|
# ¿ Nov 2, 2012 12:43 |
|
Sedro posted:You can't. Write to a temp file and use InsertFile. I'd look into open xml sdk, it can do some neat poo poo without office automation. I'm not sure I entertains what needs to be done but making word documents with it is quite easy.
|
# ¿ Nov 3, 2012 02:35 |
|
Dromio posted:I'm struggling a bit with modularity and reusable code using Entity Framework. I have some slightly complex logic to determine sales for a user, something like this (simplified, but enough to go on): Look in to deferred execution, C# actually only executes your queries when you enumerate them etc. So keeping stuff as an IQueryable as long as possible means that it will reflect changes deeper down. This is what makes EF angry at you "this method cannot be translated into a store expression".
|
# ¿ Feb 8, 2013 16:32 |
|
I'm having issues with ASP.NET MVC, when deployed to our ISS any first visit to the website is soo sloooow. Does anyone have the same experience and any idea of how to fix it?
|
# ¿ Mar 26, 2013 09:33 |
|
Cool, thanks for the replies. Figured it was something like that. I'll check your repo GitHub
|
# ¿ Mar 26, 2013 13:51 |
|
Gul Banana posted:has anyone been paid to use winrt yet? does anyone know anyone who's been paid to do winrt? This but WPF, I work at a small shop were most people work mostly with Biztalk the rest of us (two old geezers and me) are regular developers. They have always worked with just WinForms and I'm just a new guy so now that we are soon going to start a new big project we think that maybe it's time to make the switch. Is this the right call?
|
# ¿ May 12, 2013 17:42 |
|
Dirk Pitt posted:I understand that as well. I have a shitlord architect who forces everyone to use his custom mvvm pattern. I think you are missing the fact that an async method can return Task, just Task. Not a Task of T. Hope this helps.
|
# ¿ May 17, 2013 16:30 |
|
So we're making the switch to WPF and because of 'not built here' we are making our own little MVVM-framework. In previous business applications we've always made frequent use of disabling and enabling buttons depending on what actions are available to the user (such as Save being disabled if the form is invalid) and we want to keep this behavior. While we haven't really looked at IDataError yet we figured we could get this behavior with either special properties (bools like CanSave) databound to controls or value converters evaluating states we think that using the former is best. To avoid having this state evaluating code everywhere my boss wants us to use one centralized States(string field, object value) method to change all states and to contain the code that sets flags etc. I think that while it does work it's not very elegant or smart, since we are using the INotifyPropertyChanged interface I figured, why not subscribe to ourselves? Kinda like this: code:
I figure that each viewmodel can implement a method like this: code:
|
# ¿ May 27, 2013 09:11 |
|
Sedro posted:ICommand exists specifically for what you are trying to do. How do you expect to create a MVVM framework without knowing MVVM? Well, I did say I was a new guy. We are only just starting with this and ICommand together with what I have found about RelayCommand looks almost exactly like what we have been trying to do. Oddly Pluralsight which teaches me a lot has basically nothing about ICommand! edit: Found something there zokie fucked around with this message at 08:07 on May 28, 2013 |
# ¿ May 28, 2013 08:03 |
|
So while we are trying to get our heads out of our asses to get started with WPF and MVVM I'm doing a side web project. One of the requirements are to be able to have the client download several files by clicking one link. To me that seems really stupid and borderline impossible, am I correct in saying: Either they click one link per download or they get a .zip file? Also in the same vein. You know how a mailto: link usually opens someones mail client when they click it. I need to get one or several attachments in there to. I this what ActiveX is about?
|
# ¿ May 31, 2013 15:59 |
|
If none at your job at least mentioned PCI-DSS quoting your job might not be such a bad idea. Seriously: if your are handling credit card info your boss should tell you what and how he expects of security...
|
# ¿ Jun 3, 2013 16:37 |
|
Polidoro posted:Quick question: Use the developer tools of your chosen webbrowser and/or Fiddler to see if anything actually gets posted.
|
# ¿ Jun 4, 2013 21:21 |
|
Using IValidatableObject you can get serverside validation, it has access to this and will trip up on ModelState.IsValid. To use it be sure to include a validation summary in your form (Html.ValidationSummary). If you want clientside you probably need Javascript which has lovely not iso dates....
|
# ¿ Jun 6, 2013 22:31 |
|
Can I get some help getting arguments for using the TPL to do asynchronous stuff? The senior developers here are all like: "We have this old thing with callbacks that we know works bla bla bla" OR "Just because you though it was pretty easy to learn that doesn't mean everyone else will get it." If it helps this is a discussion we're having regarding a new big project we are in the midst of starting, our first real big WPF-project.
|
# ¿ Jun 11, 2013 10:25 |
|
glompix posted:ASP.NET MVC goons! I'm catching up on the framework features and am not really sure how to avoid ending up with a /Views/Shared/EditorTemplates folder that's a mile long. The project I worked in before started nearly as soon as the framework was released, so we wrote our own binding, validation, and HTML helpers. I want to start using the built in stuff, though. Before, I just used partial views to achieve the same thing, (which was easy to keep organized across a big application) but can't here. Any tips? It would help if you specified the actual problem you are trying to solve/solving. Personally I've only used EditorTemplates for formating DateTimes to different stuff... But I guess I have similiar "problems", I tend to get a lot of shared partial views that are needed everywhere.
|
# ¿ Jun 27, 2013 21:16 |
|
Can't you just uncheck the namespace provider property of the folder? Sometimes I do that when I need folders to organize it for myself but still want stuff to have the same namespace. It will still gently caress it up when making a new class with Alt+C though... Edit: I read good after just eating way too spicy food.
|
# ¿ Jun 28, 2013 17:03 |
|
Ithaqua posted:I generally mediate all of my controller interactions with another layer. This is some good poo poo, and definitively how I'm going to structure my MVC apps from now on. And on a side note I made the effort to learn T4-templates today, now I wan't to code-generate all the code Still most of the plumbing that needs to be generated/made is either because WCF doesn't handle generics (can't be avoided), because my boss/colleagues don't seem to comfortable generics (ugh) or that it was decided to only use one WCF-service for client-server communication (, countless businessobjects all with CRUD, GetById and GetAll at a minimum). Luckily almost everyone is on vacation and won't be able to stop me from at least segregating the service interface... But any way, T4-tempating is really neat.
|
# ¿ Jul 3, 2013 21:51 |
|
In this WPF-project I'm working on I have a basic list of stuff, if you double-click an item or whatever a dialog appears that let's you edit it. Said dialog is opened from the code-behind of the view containing the list, in the dialog I attach a click handler to the Save-button which closes the dialog with DialogResult = true. I check this in the view that opened the dialog and if it's set to true (changes made) I update the list from the server. My problem is this, using TPL the Save-command called on the ViewModel of the dialog returns control super fast, too fast . The view gets the dialog result and updates itself before the ViewModel was done saving changes... I already have an ICommandViewModel interface for ICommands on ViewModels, I figured I should implement an CommandExecuted-Event and close the dialog by subscribing to it instead? But I wan't the dialog to disappear as soon as possible, hide and then close? What are your thoughts?
|
# ¿ Jul 11, 2013 10:19 |
|
His Divine Shadow posted:Is there some LINQ equivalent to this Mysql sorting ability? LINQ provides OrderBy and ThenBy and Descending versions of them both.
|
# ¿ Jul 18, 2013 12:36 |
|
VVildo posted:I have a hard .NET == 4.0 requirement on this WPF project. I'm trying to do the old don't block the UI thread trick. I tried using Tasks and ContinueWith and am running into basically the exact same problem as this guy. I've had the same problem, in your AsyncCommand, or whatever, call CommandManager.Invalidateblahblah after you set the isExecuting to false right after the the delegate is done executing. This tells the CommandManager to raise the RequerySuggested event which should tell fix your UI problem.
|
# ¿ Aug 26, 2013 23:37 |
|
Can't you make an extension method that takes and IEnumerable and foreaches on you collection?
|
# ¿ Sep 2, 2013 06:38 |
|
Since Ithaqua said it was so easy getting the C#-cert I decided to try, but being cautious I'm gonna read the exam reference first. I found some pretty neat things in there I thought I'd share. First, it advocates assigning an empty delegate to EventHandlers as has been discussed here and also mentions that EventHandlers can ONLY be assigned a null value from within it's class. This saves you from having to null-check the handler all the time (if(OnSomeEvent != null)). code:
code:
code:
code:
|
# ¿ Sep 3, 2013 10:58 |
|
Am I the only one that want's to puke on doing stuff that way? It looks like you wan't to tie classes to tables but use richer objects in your code but still use the EF classes causing you to use this strange behavior. I'm sure this isn't your real business case but from you example it looks like Students and Addresses map One-to-Many so how does you DTO know which address to edit? I either use richer classes or handle everything separately and use transactions if necessary...
|
# ¿ Sep 6, 2013 19:50 |
|
A database cluttered with stored procedures
|
# ¿ Sep 7, 2013 16:03 |
|
Don't expose IQueryable<T>!! You should be able to figure this out by yourself, but when you think: "I don't want a repository pattern because then I can't test/expose IQueryable" you are a danger to yourself and those around you.
|
# ¿ Sep 11, 2013 20:26 |
|
I always get burned by assigning stuff to the backing field and not the property which doesn't cause a notification. You might also be on to something with the x:Name maybe causing it to become a regular property or field and not a DependencyProperty or something
|
# ¿ Sep 19, 2013 15:35 |
|
So how do people deal with styling for WPF? Anyone know of any good themes available for a non-shitload of money? Are the things by Telerik worth the money?
|
# ¿ Sep 20, 2013 13:09 |
|
Uziel posted:MVC question: When I need to do stuff like this, I always use hidden fields.
|
# ¿ Oct 3, 2013 17:34 |
|
Mr. Crow posted:WPF Question. Can the user create new dialogs still? To handle dialogs in an application where all windows were modal I've previously used a Stack<Window> in a view manager, we needed to keep any window open until the viewmodel had finished with any remote calls and then close it. So when a new dialog needed to be opened we pushed it on the stack and then when we're done and need to close it we pop it of and close it. Still it seems to me that any solution for maintaining control-flow with views doing MVVM seems to involve some kind of horror...
|
# ¿ Oct 11, 2013 12:57 |
|
Who ever said the Programming in C# cert. was easy wasn't kidding. It was really loving easy, so thanks
|
# ¿ Oct 15, 2013 15:16 |
|
Why not make your classes more pure and turn things that need a date into a method with the date as a parameter? IsValid(DateTime date) instead of properties and the like. In the end you need to get the date from somewhere, but I think it's better to explicitly provide something like a date as a parameter instead of as dependency...
|
# ¿ Oct 24, 2013 16:15 |
|
I'm a bit unsure about what you are trying to accomplish, but one big difference between Java and C# is that in Java all methods are virtual by default were as you have to explicitly declare them as virtual to be able to override them in C#.
|
# ¿ Nov 18, 2013 16:47 |
|
So I've encountered a strange thing happening to me in WPF. Calling this method:code:
code:
code:
zokie fucked around with this message at 15:08 on Dec 6, 2013 |
# ¿ Dec 6, 2013 15:03 |
|
And here I thought dynamic was about working with JSON easier or when you don't feel the need to create an interface for some shared properties or whatever... I guess I should be glad I don't have to deal with COM stuff...
|
# ¿ Jan 18, 2014 20:39 |
|
I'm having trouble with using a DataGrid in WPF for the first time. What happens is that when you select the placeholder for a new item any further input adds a new row in the DataGrid but doesn't switch focus or anything. So if you click the bottom row and start typing you're gonna end up with as many new rows as keys you pressed... I hooked up some eventhandler and selected the item with index count -1, but this doesn't fix things because I still lose the first character that "initiated" the creation of the row. I hope this isn't intended behavior because it's stupid... Does anyone have any tips or ideas for me to try?
|
# ¿ Jan 21, 2014 13:57 |
|
Have you tried contravariance and generic type constraints? Edit: Sorry for killing the thread Also maybe this could help you? zokie fucked around with this message at 15:14 on Feb 11, 2014 |
# ¿ Feb 10, 2014 17:56 |
|
Anyone done 70-461, sql something something? Was it hard?
|
# ¿ Feb 19, 2014 07:31 |
|
Google gave me this, is it a desktop application or a web-thingy?
|
# ¿ Feb 20, 2014 15:00 |
|
|
# ¿ Apr 28, 2024 18:03 |
|
What problem are you trying to solve exaclty? Embrace the null instead. Absolutely use nullables for keys and such. Using int? keys and the like has made my life so much easier. What you are doing just seems strange, and I really don't see any benefit to it.
|
# ¿ Feb 28, 2014 13:05 |