Andrew Mystery

Andrew Mystery

  • NA
  • 9
  • 4.5k

JavaScript Extjs combo box selection to call method in mvc

Nov 23 2015 4:23 PM

Here is my combo box I want to put 3 values in this combo box and have it so when a value is selected it calls a method in my controller class.

Could I get a example on how to call my method in a different class from a value selected in the combo box 

{
xtype: 'label',
style: 'margin-right:5px;margin-left:3px',
text: 'Format'
}, {
id: 'FormatId',
xtype: 'combo',
width: 140,
displayField: 'Text',
valueField: 'Value',
emptyText: 'Default',
hiddenName: 'FormatId',
forceSelection: true,
triggerAction: 'all',
mode: 'local',
//Controller class
[Authorize(Roles = RoleAdmin + "," + RoleBilling + "," + RoleBillingDocument)]
private ActionResult TripLogSpreadsheet(List<usp_TripLogResult> list, object[] filterStrs)
{
const int colRideDate = 0;
const int colJobNum = 1;
const int colMemberName = 2;
const int colAWS = 3;
const int colRNS = 4;
{
ICell hCell = hRow.CreateCell(colWaitTime, CellType.NUMERIC);
hCell.CellStyle = template_row.GetCell(colWaitTime).CellStyle;
hCell.SetCellValue(record.WaitTime);
}
{
ICell hCell = hRow.CreateCell(colBilledAmount, CellType.STRING);
hCell.CellStyle = template_row.GetCell(colBilledAmount).CellStyle;
hCell.SetCellValue(String.Empty);
}
{
ICell hCell = hRow.CreateCell(colAttendantsQty, CellType.STRING);
hCell.CellStyle = template_row.GetCell(colAttendantsQty).CellStyle;
hCell.SetCellValue(!String.IsNullOrEmpty(record.AttendantsQty) ? record.AttendantsQty : String.Empty);
}
{
ICell hCell = hRow.CreateCell(colSignature, CellType.STRING);
hCell.CellStyle = template_row.GetCell(colSignature).CellStyle;
hCell.SetCellValue(String.Empty);
}
sheet.ForceFormulaRecalculation = true;
var memoryStream = new MemoryStream();
wk.Write(memoryStream);
return File(memoryStream.ToArray(), "application/vnd.ms-excel", "trip_log.xls");
}

Answers (1)