Wondering is there a way I can add textbox and a button so on click of a button reads textbox value and calls javascript?
Right now I am showing two buttons using following code:
.ColumnMenu(i => i.Columns(false))
.ToolBar(toolbar => Model.ConfigureToolbar(toolbar, toolbar2 =>
{
if (Model.CanCreate && Model.SourceId > 0)
{
var caption = string.Format("Copy Items From Source ({0} {1})", OrderHelper.GetEntityLabel(Model.SourceIsQuote),
Model.SourceId);
var show = new OrderItemGridCopyFromSourceLaunchInfo
{
StateKey = Model.StateKey,
Title = caption
};
Model.CopySourceInfoTo(show);
toolbar2.Custom().Text(caption + "...").Url(string.Format("javascript: order.showItemGridCopyFromSourceForm({0});", JsonConvert.SerializeObject(show)));
}
}))
public static void ConfigureToolbar<T>(this IDialogStartInfo info, GridToolBarCommandFactory<T> toolbar,
Action<GridToolBarCommandFactory<T>> additional) where T : class
{
if (info.CanCreate)
{
toolbar.Custom()
.Text(string.Format("Add {0}", info.Subject))
.HtmlAttributes(new {href = string.Format("javascript:{0}();", info.AddDialogFunction)});
}
if (additional != null)
{
additional(toolbar);
}
}