WPF IsEditable=true ComboBox filled with objects displays the ToString() as the selected item

You can do this entirely within Xaml <ComboBox IsTextSearchEnabled=”True” IsEditable=”True” ItemsSource=”{Binding MyObjectCollection}” TextSearch.TextPath=”MyObjectName”> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text=”{Binding MyObjectName}” /> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> The upside is that you can define and change this however you want in your XAML without any code-behind. You bind the ItemsSource to your collection of objects, and then you set the … Read more

What ways are there to edit a function in R?

There is a body<- function that lets you assign new content of the function. body(foo)[[3]] <- substitute(line2 <- 2) foo #———– function (x) { line1 <- x line2 <- 2 line3 <- line1 + line2 return(line3) } (The “{” is body(foo)[[1]] and each line is a successive element of the list. Therefore the second line … Read more

jqgrid EditActionIconsColumn Events

The formatter:’actions’ is not yet good documented. The current version of jqGrid 3.8.2 support some options which you need. In lines 394-466 of the jquery.fmatter.js of the current version you can see more. What you need are onEdit, afterSave (on “Submit”) and delOptions.onclickSubmit parameters. To tell the truth I didn’t use the ‘actions’ formatter before … Read more

jqGrid: Disable form fields when editing

You can implement your requirements in different ways. For example, inside of beforeShowForm event you can hide or show the jQuery(“#list”).jqGrid({ colModel: [ { name: ‘Name’, width: 200, editable: true }, //… }).jqGrid(‘navGrid’,’#pager’, { edit: true, add: true, del: false}, { // edit option beforeShowForm: function(form) { $(‘#tr_Name’, form).hide(); } }, { // add option … Read more