databound

Data bound drop down in a gridview template

I need to limit the values in a data bound drop down placed in a template column in a gridview based on the text in another column in that row of the gridview. I also want the dropdown to be databound. Aparently, these two things are not possible at the same time as it gives a data bind error. I think .net prevents it because there is a...

WPF - How do I default the Visibility of a databound Textblock?

Hi This Textblock, defined below, shows when the window first loads because it has no Datacontext (and hence the converter code is not run) until an item has been selected from another control e.g. TreeView. <TextBlock Name="tbkDocumentNotFound" Style="{StaticResource StandardText}" Margin="4,4,2,0" TextWrapping="Wrap" ...

ASP.NET: Gridview Showing a button on a row, when a row cell vlaue = false in the Bound row from the database

I have a GridView binded to a datasource, i was wondering of how i can check a row cell value (bool) from the database row being bound , and then show a button on the rows where the cell value equals to false.. i am using OndataBound Event to retrieve the Gridview-row being bound, i take the ID show, run another procedure against the da...

Axapta: Form lifecycle question

I am attempting to manually populate an image icon into a window nested in a grid. In the run event, the fields don't appear to have values yet. The string control always returns an empty value. Is there a better place for this code? In .NET, I'd use a databound event. Is there an equivalent in AX? void run() { FormStringContro...

WPF - clone a databound object?

I am trying to clone a WPF bound object (a listbox) with code like the following pgeIncidentReport newPage = new pgeIncidentReport(); newPage.SetReportData(); string listXaml = XamlWriter.Save(newPage.lstUsers); However, when you view the listXaml string, I noticed that my databinding directives, for both the list itself and the Data...

Custom sort xml bound DataGridView

I have a DataGridView bound to xml file. I would like to sort by first column and treat values as integers (not strings). XmlDataDocument xml = new XmlDataDocument(); xml.DataSet.ReadXml("file.xml"); dataGridView.DataSource = new BindingSource(xml.DataSet, "Item"); Sort(IComparer) doesn't work Sort(DataGridViewColumn,ListSortDirecti...

How to handle two-way binding of a SqlDataSource on a ASP.NET ListBox

If I have two listboxes, with a button between them, how do I update the Items of ListBox2 if ListBox2's items are databound? <asp:ListBox runat="server" ID="ListBox1" DataSourceID="DataSource1" DataTextField="Name" DataValueField="ID" SelectionMode="Multiple" /> <asp:Button runat="server" ID="addButton" onClick="addButton_Click" ...

Image from dataset in ASP gridview

I receive a certain image name in a boundfield (i have two images in the same folder) and it comes from testing in the codebehind and binding a datatable into this gridview. example: it comes as "image1.jpg" or "image2.jpg" I'd like this text not to be displayed, instead, i want these images that are in /folder1/folder2 of my solutio...

WPF Databound RadioButton ListBox

I am having problems getting a databound radiobutton listbox in WPF to respond to user input and reflect changes to the data it's bound to (i.e., to making changes in the code). The user input side works fine (i.e., I can select a radiobutton and the list behaves as expected). But every attempt to change the selection in code fails. Sile...

asp.net-3.5 c# gridview databound

I have a query which return rows with specific fields SELECT First_Name, Midle_Name, Last_Name, Phone_home, Cell_home, ZipCode_Work, Phone_Work, Cell_Work FROM contact_info WHERE (Last_Name = @Last_Name) and here is my code to bind this query to datagridview control. protected void btnSearch_Click(object sende...

Can't find controls in FormView.InsertItemTemplate even on DataBound event

I have FormView in my page markup: <asp:FormView ruanat="server" ID="FormView1" DataSourceID="SqlDataSource1" OnDataBinding="FormView1_DataBinding" OnDataBound="FormView1_DataBound"> <InsertItemTemplate> <uc:UserControl1 runat="server" ID="ucUserControl1" /> </InsertItemTemplate> </asp:FormView> <asp:SqlDataSource runat="ser...

Silverlight - how to render image from non-visible data bound user control?

Hello! I have such situation - I'd like to build timeline control. So I have UserControl and ItemsControl on it (every row represents some person). The ItemsControl contains another ItemsControl as ItemsControl.ItemTemplate - it shows e.g. events for the person arranged by event's date. So it looks as some kind of grid with dates as a...

DataSourceID vs DataSource - Messing with my Custom Repeater

I have made a Custom Repeater. In the DataBind event, I am using a PagedDataSource (which persists) and I am determining how to grab my data from there. This works fine when I bind a datasource directly to the control. However, when I use the DataSourceID property, it binds the data, but my PagedRepeater doesn't work anymore. This leads ...

WPF Databound Listbox

I have a listbox bound to a list of objects for a data entry screen. The item template includes textblocks, a checkbox and comboboxes. When the listbox is populated I would like to change the foreground color of the textblocks to red if object.value1 = true and object.value2 = 0. Any ideas? ...

Winforms DataGrid with bound ComboBox column - How to sort by DisplayMember?

Scenario: Winforms DataGrid control in which one of the columns is a comboBox control (NB: not datagridview). The DataSource for the DataGrid is a dataView, with essentially two ID fields, lets say OrderID, CurrencyID; i show the CurrencyName in the combo and grid, but store the CurrencyID. So, the DisplayMember for the combobox is Curr...

asp repeater databound

I guys, isn't present databound event on asp repeater server control? I just want to bind all my data, and at the end creates a new ItemTemplate and add it, but just when is all data binded ...

Access 2007 not auto-updating calculation with bound fields

I developed an Access 2003 database with a form that has a number of bound input text fields. As the user update the value in these fields, the table is updated with the changed value. I also have an unbound textfield that displays a calculated value from the user input. This does not use the values from the textfields on the form, but ...

DataGridView: Format values without actually changing the bounded data?

Hello I've been searching through the web but I have not been able to find an answer. I have a DataGridView with a BindingSource bounded, which has a List of objects of a custom class. Among the fields of the class, I have a string field which I want to show using Path.GetFileName(); because it contains the whole filepath and what I...

Dynamically loaded user control databound controls not tracking viewstate

I load a usercontrol dynamically to a page on click of a button. This user control has dropdown list which gets populated on load of the user control. When I select an item from this dropdown list a post back occurs and I reload the Usercontrol again at oninit of the page. The dropdown list is not populated and hence the selection index ...

asp.net perform action after child controls databound complete

hi all, I have a usercontrol that acts as a container to hold more usercontrols within it. I need to perform certain access checks once all of the child controls have databound. I was hoping I could attach to a usercontrol.databound event but there does not seem to be one. What other options do I have to do something on the parent u...