Hi,
I have a datagrid that is bound to the results of an Stored Proc (a temp table), in code. Something like:
DataView _sendTo;
SqlDataSourceMatches.SelectCommand = EXEC get_matches 1, 2, 3
// The S/P returns multiple data sets
DataSet ds = ((DataView)SqlDataSourceMatches.Select(DataSourceSelectArguments.Empty)).Table.DataSet;
...
In my view the call below generates url ending with Tasks/Edit but I want it to generate url like Tasks/Edit/23
<%= Html.ActionLink<TaskController>("Edit Task", (x) => x.Edit("23"))%>
in Global.asax:
string taskController = NameResolver.NameOfController<TaskController>();
string editAction = NameResolver.NameOfAction<TaskController>...
Hey pals,
let's put it short: I'm trying to create a WPF custom control that inherits from WPF Image. I have added a dependency property called "Source Type" to my control so that when databound it sets the "Source" property of the image to what I want.
But the problem is that my method to perform the source changing task (i.e "OnSourc...
Hi pals,
I'm having an issue working with the Toolbar control for WPF in Blend 3:
I have a Toolbar control that is binded to a collection so that it displays both icons and labels for each one of the actions that users can perform on this application. The issue I'm having is that when I run the application the buttons are displayed ins...
I'm using model-view-viewmodel I currently have a class with 3 pieces of data: 2 integers and an enumeration.
Its constructor looks like this:
//C#
public Outcome(OutcomeEnum outcomeEnum, Int32 acutalOutcomeData, Int32 expectedOutcomeData)
{
m_outcomeEnum = outcomeEnum;
m_actualData = acutalOutcomeData;
m_expectedData = expected...
Hello all.
I am following the good old Scott Gu LINQ to SQL guide to LINQ and have stumbled upon a query.
Here is my scenario. I have a textbox a client should populate with a number (tbxHowMany), two radio buttons that define a material (radPaper & radGlass). A also have a button (btnReturn) that when clicked, a gridview (gridview1) ...
Hey guys,
I am new to WPF and am trying to create a WPF control that displays a string (which will always be a number) in a particular way. There will be three different text fields on the control and the string needs to be split up into three different components following these rules:
Lets say you have the string "1.5678". The cont...
today i thought about how to explain a databind in asp.net that also a grandmother is able to imagine it. I couldn't but use it every day.
...
I have a typical object (it comes from Linq but it could have been create manually):
public class Person
{
public string FirstName{get; set;}
public string LastName{get; set;}
public int Age{get; set;}
}
And I have a Web Form where users enter this data:
<asp:TextBox runat="server" ID="FirstName"></asp:TextBox>
<asp:TextBox run...
I want to bind parameters of a ServletRequest to arbitrary domain objects. Params are available as a map of type
Map<String, String[]> // String = key, String[] = values
They should be converted and bound to the fields of the target object. Id like to have a method like this:
// definition:
public void bind(Map<String, String[]>, T...
i have an html table inside a form in an asp.net mvc view. I am using the tablesorter jquery plugin as well.
Here is the table code (simplified for the example)
<table id=managersTable>
<thead>
<tr>
<th>Manager</th><th>Remove</th>
</tr>
</thead>
<tbody>
<tr>
<td>Manager 1<input type='hidden' name='updat...
I have a WPF Window with a view model set as its DataContext, and have a ListBox with a DataTemplate and its ItemsSource bound to the view model, like in the following example:
View model:
using System.Collections.Generic;
namespace Example
{
class Member
{
public string Name { get; set; }
public int Age { get; set; }
}
...
My WPF App receives a stream of messages from a backend service that I need to display in the UI. These messages vary widely and I want to have different visual layout (string formats, colors, Fonts, icons, whatever etc.) for each message.
I was hoping to just be able to create an inline (Run, TextBlock, Italic etc) for each message ...
Hi, i did some homework and couldn't find any article about best practices about when to use each method..
just for clarification:
When using the event aggregator pattern : each screen has it's own reference of a viewmodel, the viewmodel publish changes using the eventaggregator, which later the observers use to synchronize their state....
I am just learning to use the Entity framework and I wondered how I can bind to a select few columns with my WPF Toolkit datagrid?
Can someone give me an example?
I've tried to set the DataContext to the Person Entity for example and then set the Itemsource binding path to a single column of the table, but it does not work.
...
Hi there.
I'm getting alot of issues lately in a project im working on with databinding. When im about to display a certain form that has bindings inside its controls, the .Show method throws expcetions regarding the binding - "Cannot bind to property or column on datasource. Parameter name: dataMember.".
Now, I'm quite aware this is a...
Hi all,
I have a problem. I made a template for a TreeView and I need to set the initial value of the ToggleButton's IsChecked property depending on my model. But it turns out that setting this property using triggers/setters disables the databinding.
Is it so? If yes, give me a suggestion how it can be fixed?
<DataTemplate x:Key="Cel...
The Firebird FAQ explains how to create a BOOLEAN domain. Probably the most interesting part is at the end, where it says:
If you use a connectivity library like
OleDB under .Net, you can override the
OleDB provider's GetSchema method, so
the DataTables you get from queries
have native .Net booleans.
Is there any way to do...
Hi.
I have application full of various controls databound to my classes. I would like to ask user "You are closing application and you made some changes. Do you want to save your changes?". For this I need to recognize that user made any changes.
How to catch user made changes in databound controls? Is textBoxXXX_TextChanged the only w...
I'm writing a really simple name / value editor control where the value is editable - label on left and property text box on right. Control works fine except that when the user hits TAB when inside one of the "value" text boxes on the right, the focus shifts away from my control to the next control in the hiearchy. I want the focus to ...