component one c1List add Rows or addItems - visual-studio-2017

im using component one tools like C1List in C# (also i use Visual Studio). I want to add some rows to my C1List. i found this documentation: http://www.componentone.co.kr/files/Documentation/Winforms_List.pdf
First it seems kinda easy. here is my Code:
C1.Win.C1List.C1DataColumn col = new C1.Win.C1List.C1DataColumn();
col.caption = "JustAColumn";
c1List1.Columns.Insert(0,col);
c1List1.AddItem("newRowValue");
Thats what the documentation says. But i see no added rows. The list is empty only the new column is there.
Someone worked with c1List already?

To use AddItem you have to set C1List's DataMode to AddItem;
c1List1.DataMode = DataModeEnum.AddItem;
For more refer this page

Related

Adding a new real-time shipping system to older X-Cart

Trying to add a new real time shipping system to an existing, older (4.2.x) version of X-Cart and I can not figure out how to implement it properly. Plan is to put the lookup into a new shipping/mod_*.php file and from what I can tell merge $intershipper_rates with the response I get from the rating API. I just don't know how to reliably integrate it nor if I need to manually add anything into the database to make it work properly. There doesn't seem to be any reference material or documentation for the older version I can easily access to figure it out, either. If anybody can give me a hand wrapping my head around this, I'd appreciate it.
In the code below replace the 'CPC' substring with your new shipper code.
1) Create functions like
func_shipper_CPC
func_get_package_limits_CPC
func_check_limits_CPC
in a new file like
shipping/mod_CPC.php
2) Change the array
$mods = array("USPS", "CPC", "ARB", "FEDEX");
in the shipping/myshipper.php
3) Add a row to the shipping options table
$params = func_query_first ("SELECT * FROM $sql_tbl[shipping_options] WHERE carrier='CPC'");
4) Add possible shipping methods in the xcart_shipping table
INSERT INTO xcart_shipping VALUES (null,'Canada Post Expedited','','L','CPC','81',20,'Y','CEX',0.00,0.00,1020,'','');
INSERT INTO xcart_shipping VALUES (null,'Canada Post Regular','','L','CPC','82',10,'Y','CRE',0.00,0.00,1010,'','');
INSERT INTO xcart_shipping VALUES (null,'Canada Post Xpresspost USA','','I','CPC','89',90,'Y','',0.00,0.00,2030,'','');
.....

Oracle/APEX Adding a row to an Interactive Grid with a Dynamic Action

Currently using APEX 5.1.4
My goal is to have the user press a button, which triggers a new row to be added to the bottom of the IG. This row would also need to have some default values pre-populated, such as the sequence column I have functioning as a primary key.
Doesn't matter how exactly, but I was considering doing it with Javascript. However, none of the methods I have found online, regarding adding a row with Javascript, work.
Also, I have the header bar of the IG removed, so finding the native Add Row Button probably is not an option.
--EDIT--
I found some Javascript that successfully allows me to add a row, however, it adds the row directly underneath the currently selected row. I do not see any methods to automatically select the last row of the IG, and it still doesn't solve that the row needs to have some dynamic values upon instantiation.
Here is the javascript:
This shows all of the available functions that can be invoked ( with .invoke() ):
apex.region("id-region-emp").widget().interactiveGrid("getActions").list()
These following lines both instantiate a new empty row on the IG:
("row-add-row" adds to top of IG, "insert-record" adds underneath currently selected row.)
apex.region("id-region-emp").widget().interactiveGrid("getActions").invoke("row-add-row")
apex.region("id-region-emp").widget().interactiveGrid("getActions").invoke("insert-record")
Better to use below code:
apex.region("detaildataset").widget().interactiveGrid("getActions").invoke("selection-add-row");
Before applying this code make interactiveGrid editable by clicking on attributes and also apply primary key on one column and then apply this code in Execute javascript code:
apex
.region("detaildataset")
.widget()
.interactiveGrid("getActions")
.invoke("selection-add-row");

Specifying which index to use in sitecore lucene

I have a website that was produced in sitecore that i have inherited. The search does not seem to be working correctly. Basically documents do not seem to be returned correctly. I have noted that there is the default sitecore_web_index index and also a custom index that seems to index the same content more or less. Currently the search queries the custom index however I would like to change the query to the default index to see if the document is then returned. I was told you can specify which index to use but the person never told me how to do it. Does anyone know how i can change this?
Sitecore 8 content search uses Sitecore.ContentSearch.ContentSearchManager.GetIndex(...) method to retrieve chosen index.
You can pass either:
Index name as a string:
Sitecore.ContentSearch.ContentSearchManager.GetIndex("sitecore_web_index")
IIndexable item - in this case Sitecore will try to find first registered index for you:
Sitecore.ContentSearch.ContentSearchManager.GetIndex(iIndexable)
Just find where GetIndex is used in your code and replace it with a default index name.
One thing you should be aware of - there is a chance that your custom index has some customization added (like computed fields, list of fields indexed etc). Be careful with any changes. Maybe there are other reasons why your search doesn't work. Try using IndexingManager app to rebuild the indexes and see if it helps.
You also need to remember that on Content Manager environment, the "sitecore_master_index" will be used, and on CD Environment the "sitecore_web_index" will be used
so this can lead to test errors
You can try to get the index dynamically, in that case, the code will select the correct index use, According to their environment
var indexable = Sitecore.Context.Item as SitecoreIndexableItem;
ISearchIndex index = ContentSearchManager.GetIndex(indexable);
using (IProviderSearchContext context = index.CreateSearchContext())
{
//search code...
}
Had to do it this way ...
var indexable = (SitecoreIndexableItem)Sitecore.Context.Item;

Insert row on top of a qtablewidget

I'll like to know if it's possible to insert a row on top of a qtablewidget ?
Something like:
ui->myqtablewidget->insertRow(0);
Just a heads up - I'm answered based on the documentation and C++
knowledge, not direct experience with Qt.
It would seem that QTableWidget has an insertRow() function. You simply need to specify where you want the row placed. Read the documentation here.
Thus, it would seem from the documentation, you can insert a row at the beginning ("top") of your table with that exact line of code...
ui->myqtablewidget->insertRow(0);
...assuming ui and myqtablewidget are declared properly.

Changing column value in ultrawingrid

I have an ultrawingrid from Infragistics which binds itself to a dataset. What I want to do is, for one of the columns I want to apply a converter.
That means, for a column that displays abbreviations for example, I want to display full names for each.
Is there a nice way to do such this in here. I know in WPF I could use converters.
In your InitializeLayout event you should place something like this
Infragistics.Win.ValueList vlAbbrevs = new Infragistics.Win.ValueList();
vlAbbrevs.ValueListItems.Add("F", "Female");
vlAbbrevs.ValueListItems.Add("M", "Male");
vlAbbrevs.Key = "_ABBVS_";
e.Layout.Bands[0].Columns["Gender"].ValueList = vlAbbrevs;
You could use a DataFilter. The following is an overview of data filters: http://help.infragistics.com/NetAdvantage/WinForms/current/CLR2.0/?page=WinGrid_About_Data_Filters.html
The following blog post has an example:
http://blogs.infragistics.com/winforms/articles/using-an-wingrid-datafilter-to-convert-strings-to-bools-and-vice-versa-for-a-checkbox-column.aspx