wpf modify single column to be comboboxcolumn - wpfdatagrid

I've made a significant edit to my original post.
Is there a way to modify a column so that it's a ComboBoxColumn without having to change the fact that the other columns will autogenerate? Or is there a way to simply tack on another column that is a ComboBoxColumn?
I haven't supplied code because I'm just looking for a generic way of doing this. If there isn't one then I'll look for alternatives afterwards.
I'm a complete newbie to this WPF stuff so any help would be appreciated. If you need code let me know (it works but it's kinda messy).

Related

Get PDF form field description with VBScript

I'm pretty new to VB, but I've got a script working which involves taking a PDF with fillable fields, and populating a column in an xlsx with all of the field names.
I would like to take this a step further, and pull the field descriptions as well, into another column. By that, I mean the description which comes up when mousing over a particular field in the form. Getting the name of the field is easy enough, but I've done some digging and am not sure if it's possible to pull the description as easily.
I've experimented with functions similar to "object.getNthFieldName(x)," but no such luck.
Not entirely sure if this is possible, but looking for any insight. Thanks!

Custom Function Filter ordering on YADCF

First of all, thank you so much for your support of YADCF. It's a fantastic tool! Second, I'm not a programmer (I know enough to break stuff :D) so I apologize in advance for having to bother you at all. It's possible my question has even already been answered, I just don't know what to search for.
I'm using the YADCF 0.8.8 table on DOM Source (small "d"). I've built a custom_func_filter based on 11 values & labels. The weird thing is, when the drop-down menu displays for the filter, the labels are not in the order they're defined in.
In trying to figure out what the issue was, I changed the values and labels to numbers from 01 - 11 instead of text to see how it was moving things around. Apparently it's anything over 10 items that it begins to jumble everything up. Here's a side-by-side comparison on what it looks like:
custom_func_filter comparison
I'm behind a firewall so it's not easy to share my code, but I'll figure out a way to if need be. I just wasn't sure if there was something I was missing.
Using datatables 1.9.4, jquery 1.11.3.
Thank you!
You are welcome :)
Quick answer: Use the sort_as: "none" and make sure the data array is in your desired order
Explanation: BEcause in custom function filtering the select is being populated by (data) array of objects value/label the sort as (as its implemented now) wont really sort the data, so since you populate data manually, just make sure its in your desired order

Using a DelegatingStyledCellLabelProvider with an ITableLabelProvider

I am trying to style specific cells in my table that have a specific attribute. I have used a DelegatingStyledCellLabelProvider in the past for a Tree structure, and was hoping to do the same here.
However, I can't figure out how to get it working with my ITableLabelProvider.
I saw questions like this one that suggested using IColumnLabelProviders instead of the ITableLabelProvider, but I really don't want to go back and change my code.
Is there anything I can do?
DelegatingStyledCellLabelProvider will not work with the old style ITableLabelProvider as it does not support multiple columns. You must use separate column label providers.

How to search an entire column for one or two keywords

I am in the process of creating a program, using Visual Basic Express, for a physics professor who has recently had to rename all 1500 questions for his course. I created a database that has the old names, new names, and the entire contents of each question. The program seemed an easy enough idea, but has proved to be very difficult for me. I am new to programming (this is only my third go at it) and have searched for an answer to my problem for at least 20 hours, and have yet to find anything that will work for what I need.
What I would like is to have a text box in which he can type in a keyword (such as "Sun", "ISS", "Force", etc) and for the program to search throughout the entire "questioncontents" column and pull out any questions that contain those words into the datagrid. As of yet the closest I have gotten is for it to search the first word of the column, which is not very useful since most of them start with "The".
I had also thought of creating several keyword columns and then just having it search through those, but I couldn't figure out how to apply the filter to multiple columns.
This may be a stupid question, and if so I apologize, but I am desperate to figure this out as the semester begins relatively soon and I would like to show him how to use it before classes start. Any suggestions or help would be very greatly appreciated.
According to my understanding of the question:
SELECT * FROM question WHERE questioncontent LIKE '%SUN%';
As simple as that, you just have to replace SUN in the above query with the value entered in the textbox

checkbox in datagrid a field in sql table if true i need that check box to be checked

Hi I am Mukesh from Madurai
I am using a VB.Net form in which I have a table of sql. In it is a boolean field.
I want to show this field in a form as checked if that field value is true and if false then it should not be checked.
Is this is possible?
If possible please help me with the code which I have to type to make that column in the datagrid view to checked or not.
I have created the sql inside vb.net using add new item and then a database.
First, as you probably have already done, you'll need to import your database. Then set up your data source so you can reference it in code. If you don't know how to do these things, you'll need to look them up on MSDN or the like. They're pretty straightforward. (I wouldn't recommend asking a stackoverflow question to learn how to do these, as you'll probably just get a link as an answer anyway.)
Once you've gotten your database set up, you should be able to tie the checked/unchecked state of a check box (which is what I think you're referring to) to the value using a very simple code similar to the following:
CHECKBOX.Checked = DATABASE_BOOLEAN_FIELD
Replace "CHECKBOX" with the name of your checkbox, and "DATABASE_BOOLEAN_FIELD" with the reference to your database's boolean field.
So, as a recap, you'll need to do the following steps. From experience, I can tell you that one of the best ways to get better with programming is to follow a step-by-step, using your own knowledge and research skills to figure out each step.
Import database into your VB.net project.
Create data source.
Set checkbox's "checked" property to the boolean field in your data source.
After you've earnestly tried this, if you're still stumped, I can walk you through it in a little more detail. Just comment on my answer (and edit your question to include what code you've written for this so far) for more help.