I'm looking for a way to link a database table to a textbox in my WPF application. I need to take a specific cell from the table and display it in a read only text box. I've not been able to find a solution personally, and the internet has held no favor either. Thanks for the help in advance!
Post any questions in the comments, I'll edit this question and make it more specific.
Related
I'm doing a Paint Sales Program in C # - DevExpress with EF. In the SQL Server database. When entering orders I need to enter more than one paint pattern in a TextBox (TextBoxEdit). Normally, I can call that record with autocomplete when I enter a record, but all I want is a few patterns that I have entered. Separating patterns with commas. I used TokenEdit in DevExpress for this, but it doesn't have a DataSource property, so it gives an error when transferring the data inside it to the BindingSource that I've linked to the grid.
How do I proceed? Could you please help I haven't found a valid solution for 1 week. There are people here who are more knowledgeable than me, so maybe you have a different solution to the problem.
I will be glad if you help me.
Thank you.
I will be glad if you help me.
Thank you.
I have a database running in SQL server that I can edit/add/ retrieve information from with no worries. I just have a question about the best way to lay out the database in this situation.
Say I have a database stored with the columns
Score, DateTime, Comment
but when I want to display the table to the user I want them to see a table that has
Ranking (just 1-25 or so), Score, Time Since, Comment
What is the best tool to use in visual studio to achieve this?
I have been trying to use GridView which I figured made sense but I have trouble creating the ranking column and the time since column. What is the best way to achieve this?
Also when I adjust some algorithm to sort the comments by score and time since, where do I put this? In the C# or is there some way to incorporate this into the database?
Thanks a lot for the help!!
EDIT: It's an ASP.NET web form application
Use SSRS (Reporting Service) and use the TOP filter in your grid.
I am trying to build a windows form application that compiles quiz questions into a pre constructed word table from a database. I am struggling to find the right code to pull a random line from my database (question to one cell, answer to another cell in my table). The idea is to have it automated from a button click event. Through lots of Googling I have figured out how to call up the word document containing the table but not how to write to it from the database.
I just wanted to try to clarify your situation:
You currently have a database of questions and corresponding answers.
You want to have a click event that on a button that will pull a random question and answer to prompt the user.
Then write to a word document the question and answer in whatever order those questions have been chosen.
Here's how I would go about doing this:
Start getting these in List variables
These kinds of situations are easier if you can contain data from a database in variables from the beginning rather than trying to use data straight from the database (that might be a personal thing I enjoy but it might help you as well).
Start playing around with word.interop libraries. If I remember correctly, you have to call up the Word App, then call the word document, then write lines individually. Google will help plenty here.
Hopefully this helped
Ok so here is what am thinking. Am making a recruitment website to hire people. It gives a functionality to the applicant that he can build his cv online! i have made various forms for that.
After filling the forms the applicant will submit the information to database and then am saving all of the information from the webpages related to building cv in the database!
Am thinking of providing the applicant a tab on which when he clicks "View CV" and i show him the cv he built on a new web page in the format like this
http://careers.telenor.com.pk/Page/Detail/VacancyView.aspx?PositionID=3003265
Like the fields should be on the left as table columns and their respective content in the database on the right! Can anybody completely guide me how i can do that ?? or direct me to a specific tutorial ?? i would be grateful! Am using Asp.net!
I have seen grid view! Much like a table it is! with columns on the top and below the values in the database! That is not the thing i want!
DetailsView control can be used to display fields from a single data record. It has that "format" you are looking for.
You can find documentation in this link http://msdn.microsoft.com/en-us/library/s3w1w7t4.aspx
I need an advice for a c# asp.net project.
My client wants to see some reports via the gridview object with master/detail structure.
The main gridview will be full by all master data and each row will have a + icon (or button) on the first cells.
When user clicks this icon, the all details data of that master row should be seen under that master row with collaps action.
I can handle the database proccess but i can not figure out the collapsing part.
How can i put some extra rows under the specific row on the gridview object?
Thanks in advance..
Matt Berseth has one of the most impresive tutorials on this kind'a stuff
it contains til now 28 tutorials only on the GridView plus a lot from other asp.net controls as well using jQuery with them. I do learn plenty with him. I really love his work and I just wanna share this with you, you might actually get some good and professional ideas from his code!
There is a CodeProject article with downloadable source:
GridView inline Master/Detail record display
Thanks but its for updating or inserting.
Instead , i have found that page, it seems more effective.
GridView control to show master-child or master-slave data, written in c#, asp.net, and javascript.
Here is another good CodeProject blog. Explains multilevel master/detail without JavaScript.
http://www.codeproject.com/KB/aspnet/MultiNestMDGridview.aspx
This is the easiest to use control I've ever run across:
http://code.msdn.microsoft.com/CompleteGridView