KendoUi dropdownlist : how to select text instead index - kendo-ui

How i could select datatext field instead index
the following select the index instead the datatext field
var hhProduct = $("#ProductData").data("kendoDropDownList").select();
Please advise how i can achieve this

To get or set text of a dropdown you have to use $("#ProductData").data("kendoDropDownList").text();

Related

Is it possible to evaluate SQL given as text? (Oracle APEX 21.1)

I have created a classic report region (REGION: REPORT_FILTER_SHOP_TYPE).
That has a SQL below this.
SELECT
ID, SHOP_NAME, SHOP_TYPE, OPEN_YEAR, CITY
FROM SHOP_LIST;
I want to apply a filter to this table. The filter criteria will be selected from the list item. And this page have some lists.
For example, if there is no filter, the SQL right above one. But if the "SHOP_TYPE" and "OPEN_YEAR" are selected, execute the SQL below.
SELECT * FROM (
SELECT
ID, SHOP_NAME, SHOP_TYPE, OPEN_YEAR, CITY
FROM SHOP_LIST
) S
WHERE S.SHOP_TYPE = 'BOOKSTORE' AND S.OPEN_YEAR <2010;
I can now create the compose SQL text from selected list items.
What do I need to set to display this result in REPORT_FILTER_SHOP_TYPE?
Well, most probably not like that; why using parameters on a page if you hardcode some values into report's query? Use parameters!
Something like this:
SELECT id,
shop_name,
shop_type,
open_year
FROM shop_list
WHERE ( shop_type = :P1_SHOP_TYPE
OR :P1_SHOP_TYPE IS NULL)
AND ( open_year < :P1_OPEN_YEAR
OR :P1_OPEN_YEAR IS NULL);

Get value from SQL what was relation from other list. (Oracle APEX 21.11)

I want to display a value to the text field; it is from a SQL query. And that SQL's WHERE keyword is from the list item.
Searching by ID in the selected row will return a single item.
SELECT SHOP_NAME, ID FROM M_SHOP WHERE ID = '(selected ID)';
Just use page item's name preceded by colon (:) sign. For example, if that ID represents department ID and page number is 1, that could be
SELECT SHOP_NAME, ID FROM M_SHOP WHERE ID = :P1_DEPARTMENT_ID

Datatables Individual column searching (select inputs) Reloading After ajax

I have a Data table populated using ajax request then the Individual column searching (select inputs) api is called and i am able to use the search functionality,But on new data get appended to table the select feilds are not getting reinitilised and the select feild options still shows the old values
if you update by javascript function then try this
function updateTable(){
//your updation code
var table = $("#dataTable").DataTable(); // get api instance
// load data using api
table.ajax.url(ajax_source).load();
};

Oracle APEX how to refer to values in other columns in a tabular form

I have an Oracle APEX tabular form with the following columns:
Project,Rater Group,Ratee,Min Persons,Max Persons
Project and Rater Group are select lists. When I select a value for Rater Group I would like to limit the Rater Groups to only those Rater Groups in the Project in the first column. However the column attributes does not have a cascading value similar to form fields. Is there any way of doing this?
I've tried:
project_id = apex_application.g_f03(:APEX$ROW_NUM)
project_id = #PROJECT_ID#
project_id = :PROJECT_ID
project_id = apex_050000.wwv_flow_tabular_form.get_row_values
none of which works.
Found this page which links to some nice examples of how to cascade within tabular forms:
https://community.oracle.com/thread/2359498
The first link posted by 'Roel' shows a working example.

How to query dataset table on primary key of smallInt using linq C#

Let say I have the following sql table. Customer_id column is a primary key with smallint.
And I am trying to create a linq query, where I want to get all data for customer with id, let say 1.
How to do this.
Already done and not working:
1.
var query = from row in dt.AsEnumerable()
where row.Field<Int32>("customer_id") == Convert.ToInt32(2)
select row;
2.
var query = from row in dt.AsEnumerable()
where row.Field<Int16>("customer_id") == Convert.ToInt16(2)
select row
debug for example 1,2
Syntax error
Exceptions
Why don't you use this:
DataRow needle = hayStack.Tables["Customer"].Rows.Find(2);
Your method should be rewritten as something like this:
private DataRow GetCustomerDetails(Int16 customer_id)
{
return _dt.Tables["Customer"].Rows.Find(customer_id);
}
The calling method would have to check for null beeing returned from the method, since an invalid customer_id would cause Find() tu return null.
Try using short type instead of Int32.

Resources