table get the cell from the row - eclipse-plugin

I have one table with 3 rows and 3 columns. Now I want to add 2 row's 2nd columns cell's control. That means whether that is text or combox in the cell. How do I get the 2nd row's 2nd column and remove the compoenent dynamically in SWT JFace?

Do you use a TableViewer?
The SWT-way of getting to the item is indexed first by row, than by column.
Getting the text of the third column in the second row is done like this:
table.getItem(1).getText(2);
To display custom-controls, like a combobox you will have to either paint it manually or use SWT's TableEditor.
Also check out this tutorial: http://www.eclipse.org/articles/Article-Table-viewer/table_viewer.html

Related

How to display single listview items in 2 columns and n number of rows in Xamarin Forms

I have a list with 5 items (count 5 is dynamic). I need to display first item in first row column 1 and second item in first row column 2 and second item in second row column and so on. eg. in the attached image, consider all the items as a single list of names but displayed in multiple rows but with two columns. Kindly don't suggest any plugin for this In the attached image, list count is 12. Have to arrange 12 items as in the image.
List view is not provide this functionality, You have to use collectionview instead of Listview
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/collectionview/layout

Excel 2016: Conditional Formatting: Highlight row if cell value is in list

Excel 2016 Conditional Formatting question:
I have two tabs, Data and List:
Data has 5 columns. Column A is the item ID number, the others have
project related data.
List has 1 column. This is a list of ID numbers
that have been processed.
Here is the question:
How do I highlight the rows for processed ID numbers? I want to be able to add ID numbers to List as I process more rows. I want to see processed items in Data in green highlight, because green makes the boss happy!
Looking forward to your input!
I would use a VLOOKUP to find the value in the List sheet. An error means the value doesn't exist. Since you want to know if it does exist, just invert the boolean result with NOT
=NOT(ISERROR(VLOOKUP($A1,List!$A:$A,1,FALSE)))
Note: This is a Classic > Formula formatting rule, and the lookup value is $A1 because my "applies to" range starts on row 1 (and we always look at col A).
Rule:
Formatting Range:
Result:

vb.net check the value of each column for only the 1st row datatable

I want to check the first row only of a data table. I want to verify that the right name is in the right column. The first row has header name and they have to be in the right order. for example I want to check the first row and the first column to check that it has "First Name"
If I do the following it give me the right column data but it gives me the 2nd row not the first. I don't get it since I am asking for row 0 and col 0.
Dim ExcelData As DataTable
field = ExcelData.Rows(0)(0).ToString()
(actually I will want to do a IF to check this column. first wanted to see what value is there before I code it all )

Retrieving both values from a 2 column ComboBox VBA

I have a user form (excel, VBA) where there is a 2 column combobox. When user selects a certain value from the combobox, I want to get the value he selected, and the value associated with the first value (ie. the second column value).
How do I do this? Simply ComboBox1.Value returns the value of the first column. ComboBox1.Value(0) doesn't work.
Use the column property of the combobox. It is 0-based so the first column is column(0) and the second column is column(1).
Me.ComboBox1.Column(1)

Highlight cells based on some criteria related column and rows to another table

I have two worksheets: the first one is main (Table 1) and the second is the report (Table 2) generated from values in two columns in the main table. When the conditional formatting is triggered the cell in Table 2 is highlighted:
In Table 1, the primary key is a compound key combining id-year columns.
In Table 2, the report checks whether the related column-row exists in Table 1 and if so the cell is to be highlighted.
How I can achieve it using conditional formatting?
I've some steps that will converted to conditional formatting in cell below:
In selected cell, the paired value year-id from table 2 will be
looked up in Table 1 in the relevant column pairing.
If the related paired-value exists, the cell in Table 2 is highlighted (the color differs between ids) and if not it won't be highlighted.
For Step 1. I can't find the right formula. If there is another solution I'll considered it.
Can Step 2. be achieved with VBA and if so, how?
[updated]
Based on pnuts's suggestion, the problems above I can achieve with some modification to get vary color but recently I get different format value that appear in table 1 that look like "2003-2004". In second table, the related column (2003 & 2004) must be highlighted.
How I can check "-" sign then highlight two related columns?
Assuming Table1 and Table2 are both in Cell B2, one way is to put =Sheet1!C5&Sheet1!D5 in your Table2 sheet in A5 and copy down until a cell appears blank, then apply CF to =$C$6:$M$11 with this rule:
=MATCH($B6&C$5,$A:$A,0)>0
This would only apply one colour throughout (which may be less confusing than 5 or more) but I take it you know how to break this down into separate rules for different colours by restricting the range for each to one row at a time.