checkbox for dropdownlist - drop-down-menu

I am binding drodownlist from Db as shown below:
ddlTemplates.DataSource = ObjBlTemplate.DsGetTemplate;
ddlTemplates.DataTextField = "templateTitle";
ddlTemplates.DataValueField = "templateID";
ddlTemplates.DataBind();
I need to display checkbox for each and every field.

In asp.net you have not any built in function to do this.If you want to use javascript with your asp.net code link here is a example about this.

Related

Syncfusion MVC Report Viewer Parameters from Query

Im trying to render SSRS Parameters on Syncfusion Report Viewer with Razor Engine
How can i do this?
Can i do this without define hardcoded parameters on my Controller?
We can able to pass the parameter values to report from Razor View as shown in below code example.
#(Html.EJ().ReportViewer("reportsample")
.ProcessingMode(Syncfusion.JavaScript.ReportViewerEnums.ProcessingMode.Remote).ReportServiceUrl(VirtualPathUtility.ToAbsolute("~/api/SSRSReport")).ReportServerUrl("http://mvc.syncfusion.com/reportserver").ReportPath("/Report Project1/InvoiceTemplate")
.Parameters(param =>
{
param.Name("InvoiceID").Labels(new List<string>() { "InvoiceID" }).Values(new List<string>() { "10250" }).Add();
})
)
Also, you can able to populate the parameter values from query as given in below MSDN articles,
https://msdn.microsoft.com/en-us/library/ms157187.aspx
https://technet.microsoft.com/en-us/library/dd220464(v=sql.105).aspx

angular ui-grid filter on button click

I'm new in angular. We are using UI-grid for data presentation is is possible to customize filter process. I want to customize it in that way, that filtering is peformmed on button click, not on keydown?
This is idea
$scope.search = function (){
$scope.personCardGrid.useExternalFiltering = false; $scope.grid1Api.core.notifyDataChange(uiGridConstants.dataChange.ALL);
$scope.gridApi.core.refresh() $scope.personCardGrid.useExternalFiltering = true;
$scope.grid1Api.core.notifyDataChange(uiGridConstants.dataChange.ALL);
$scope.gridApi.core.refresh() }
Regards
You need to define your own headerCellTemplate for the column. In the template, add a input text box and a button too. Then, define a function in the controller and call it using the external scope which will filter the records.

Add an "Add New..." option to a Kendo DropDownList

I'm using a Kendo DropDownListFor which populates from a DB table. I want to add an option at the end that says "Add New..." which takes the user to a Create view for that DB table. Is there a way to do this (preferably in the MVC Helper, not in javascript).
Not possible without JavaScript. If using JavaScript you need to use the change event and see if the value is equal to that last item in the list then navigate the page. Something like this:
function onChangeOfDDl(e){
if(...) { //you condition
window.location.href = "/editRecord/" + this.value()
// this.value() will give you the value for the selected item or the text if no underlying value exists
}
}

Can anyone tell how to attach an event handler to a hyperlink in Kendo UI Grid?

I am using MVVM framework(view/viewmodel). I have a hyperlinked field on one of the kendo grid columns. My requirement is that on clicking the hyperlink on the grid, viewmodel function should call. I am trying to achieve this but not able to call. Please suggest any approach for this.
Define a template as:
template: 'Click-me',
And then define SayHello function as:
function SayHello(me) {
alert("hello");
var item = $("#grid").data("kendoGrid").dataItem($(me).closest("tr"));
console.log("item", item);
item.sayGoodbye();
}
NOTE: That SayHello needs to be global.
Where sayGoodbye is defined in your model.
Example here http://jsfiddle.net/OnaBai/2p3yH/

get value from telerik combobox clientside

I have added a rad combobox to a page and need to be able to get the selected value from it. I can see below the html element a hidden field called 'mycontrol_ClientState' I take it this is where I am meant to retrieve the value from however I dont know how to.
Does anyone have an example of getting the value out clientside?
Use the get_value() JavaScript method:
var combobox = $find("<%= RadComboBox1.ClientID %>");
var value = combobox.get_value();

Resources