How to bind each DataGrid column separately?
Good day fellow Flex developers!
Could you please help me out. I am trying to figure out how to bind each DataGrid column separately. I need to bind each column to a separate bindable array variable. Is there a dataProvider property for each DataGridColumn???
Thanks in advance,
Eugene
hopefully nope
just imagine code complexity for that feature?
how would you think should behave DataGrid when you'll populate your separate arrays with variable items number each?
all you are able and should do is to build composite dataProvider source, join all your separate arrays into it, this is your responsibility.
If you feel this message answers your question or helps, please mark it respectively
Similar Messages
-
How to bind bar chart(columns) to array list object in c# win form
how to bind bar chart(columns) to array list object in c#win form
Hi Ramesh,
Did you want to bind list object to bar chart? I made a simple code to achieve binding list to bar chart.
public partial class Form0210 : Form
public Form0210()
InitializeComponent();
private void Form0210_Load(object sender, EventArgs e)
BindData();
public void BindData()
List<int> yValues = new List<int>(new int[] { 20, 30, 10, 90, 50 });
List<string> xValues = new List<string>(new string[] { "1:00", "2:00", "3:00", "4:00", "5:00" });
chart1.Series[0].Points.DataBindXY(xValues, yValues);
The links below might be useful to you:
# Data Binding Microsoft Chart Control
http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx
# Series and Data Points (Chart Controls)
https://msdn.microsoft.com/en-us/library/vstudio/dd456769(v=vs.100).aspx
In addition, if I misunderstood you, please share us more information about your issue.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
How not to sort datagrid column on double click
Hello,
I am currently building an application containing a datagrid for data representation. I've created a custom datagridheader in order to add a input text for filtering the columns (see code below).
My goal is to hide the textinput, and then show it on a double click on the header. So i would like to know how to avoid the sort of this column each time i double click.?
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" resize="onColumnResize(event)" clipAndEnableScrolling="true" doubleClick="managefilterField(event)">
<fx:Declarations>
<!--- The default value of the <code>sortIndicator</code> property.
It must be an IFactory for an IVisualElement.
<p>This value is specified in a <code>fx:Declaration</code> block and can be overridden
by a declaration with <code>id="defaultSortIndicator"</code>
in an MXML subclass.</p>
@langversion 3.0
@playerversion Flash 10
@playerversion AIR 2.0
@productversion Flex 4.5
-->
<fx:Component id="defaultSortIndicator">
<s:Path data="M 3.5 7.0 L 0.0 0.0 L 7.0 0.0 L 3.5 7.0" implements="spark.components.gridClasses.IGridVisualElement">
<fx:Script>
<![CDATA[
import spark.components.DataGrid;
import spark.components.Grid;
* @private
public function prepareGridVisualElement(grid:Grid, rowIndex:int, columnIndex:int):void
const dataGrid:DataGrid = grid.dataGrid;
if (!dataGrid)
return;
const color:uint = dataGrid.getStyle("symbolColor");
arrowFill1.color = color;
arrowFill2.color = color;
]]>
</fx:Script>
<s:fill>
<s:RadialGradient rotation="90" focalPointRatio="1">
<!--- @private -->
<s:GradientEntry id="arrowFill1" color="0" alpha="0.6" />
<!--- @private -->
<s:GradientEntry id="arrowFill2" color="0" alpha="0.8" />
</s:RadialGradient>
</s:fill>
</s:Path>
</fx:Component>
<!--- Displays the renderer's label property, which is set to the column's <code>headerText</code>.
It must be an instance of a <code>TextBase</code>, like <code>s:Label</code>.
<p>This visual element is added to the <code>labelDisplayGroup</code> by the renderer's
<code>prepare()</code> method. Any size/location constraints specified by the labelDisplay
define its location relative to the labelDisplayGroup.</p>
<p>This value is specified with a <code>fx:Declaration</code> and can be overridden
by a declaration with <code>id="labelDisplay"</code>
in an MXML subclass.</p>
@langversion 3.0
@playerversion Flash 10
@playerversion AIR 2.0
@productversion Flex 4.5
-->
<s:Label id="labelDisplay"
verticalCenter="1" left="0" right="0" top="0" bottom="0"
textAlign="start"
fontWeight="bold"
verticalAlign="middle"
maxDisplayedLines="1"
showTruncationTip="true" />
</fx:Declarations>
<fx:Script>
<![CDATA[
import net.awl.ismp.console.components.misc.FilterCriteria;
import net.awl.ismp.console.events.ColumnFilteredEvent;
import net.awl.ismp.console.events.ColumnResizedEvent;
import mx.events.ResizeEvent;
import spark.components.gridClasses.IGridVisualElement;
import mx.core.IVisualElement;
import spark.components.DataGrid;
import spark.components.GridColumnHeaderGroup;
import spark.components.gridClasses.GridColumn;
import spark.primitives.supportClasses.GraphicElement;
// chrome color constants and variables
private static const DEFAULT_COLOR_VALUE:uint = 0xCC;
private static const DEFAULT_COLOR:uint = 0xCCCCCC;
private static const DEFAULT_SYMBOL_COLOR:uint = 0x000000;
private static var colorTransform:ColorTransform = new ColorTransform();
* @private
private function dispatchChangeEvent(type:String):void
if (hasEventListener(type))
dispatchEvent(new Event(type));
protected function onColumnResize(event:ResizeEvent):void
dispatchEvent(new ColumnResizedEvent(ColumnResizedEvent.COLUMNRESIZED_EVT,this.width,this.column.columnInde x));
// maxDisplayedLines
private var _maxDisplayedLines:int = 1;
[Bindable("maxDisplayedLinesChanged")]
[Inspectable(minValue="-1")]
* The value of this property is used to initialize the
* <code>maxDisplayedLines</code> property of this renderer's
* <code>labelDisplay</code> element.
* @copy spark.components.supportClasses.TextBase#maxDisplayedLines
* @default 1
* @langversion 3.0
* @playerversion Flash 10
* @playerversion AIR 1.5
* @productversion Flex 4.5
public function get maxDisplayedLines():int
return _maxDisplayedLines;
override protected function stateChanged(oldState:String, newState:String, recursive:Boolean):void
trace("state changed from : "+oldState+" to "+newState);
super.stateChanged(oldState, newState, recursive);
* @private
public function set maxDisplayedLines(value:int):void
if (value == _maxDisplayedLines)
return;
_maxDisplayedLines = value;
if (labelDisplay)
labelDisplay.maxDisplayedLines = value;
invalidateSize();
invalidateDisplayList();
dispatchChangeEvent("maxDisplayedLinesChanged");
// sortIndicator
private var _sortIndicator:IFactory;
private var sortIndicatorInstance:IVisualElement;
[Bindable("sortIndicatorChanged")]
* A visual element that's displayed when the column is sorted.
* <p>The sortIndicator visual element is added to the <code>sortIndicatorGroup</code>
* by this renderer's <code>prepare()</code> method. Any size/location constraints
* specified by the sortIndicator define its location relative to the sortIndicatorGroup.</p>
* @default null
* @langversion 3.0
* @playerversion Flash 10
* @playerversion AIR 1.5
* @productversion Flex 4.5
public function get sortIndicator():IFactory
return (_sortIndicator) ? _sortIndicator : defaultSortIndicator;
* @private
public function set sortIndicator(value:IFactory):void
trace("setSortIndicator");
if (_sortIndicator == value)
return;
_sortIndicator = value;
if (sortIndicatorInstance)
sortIndicatorGroup.includeInLayout = false;
sortIndicatorGroup.removeElement(sortIndicatorInstance);
sortIndicatorInstance = null;
invalidateDisplayList();
dispatchChangeEvent("sortIndicatorChanged");
* @private
* Create and add the sortIndicator to the sortIndicatorGroup and the
* labelDisplay into the labelDisplayGroup.
override public function prepare(hasBeenRecycled:Boolean):void
trace("prepare !!");
super.prepare(hasBeenRecycled);
if (labelDisplay && labelDisplayGroup && (labelDisplay.parent != labelDisplayGroup))
labelDisplayGroup.removeAllElements();
labelDisplayGroup.addElement(labelDisplay);
trace(sortIndicator);
trace("sortIndicatorInstance : "+sortIndicatorInstance);
const column:GridColumn = this.column;
if (sortIndicator && column && column.grid && column.grid.dataGrid && column.grid.dataGrid.columnHeaderGroup)
const dataGrid:DataGrid = column.grid.dataGrid;
const columnHeaderGroup:GridColumnHeaderGroup = dataGrid.columnHeaderGroup;
if (columnHeaderGroup.isSortIndicatorVisible(column.columnIndex))
if (!sortIndicatorInstance)
sortIndicatorInstance = sortIndicator.newInstance();
sortIndicatorGroup.addElement(sortIndicatorInstance);
chromeColorChanged = true;
invalidateDisplayList();
// Initialize sortIndicator
sortIndicatorInstance.visible = true;
const gridVisualElement:IGridVisualElement = sortIndicatorInstance as IGridVisualElement;
if (gridVisualElement)
gridVisualElement.prepareGridVisualElement(column.grid, -1, column.columnIndex);
sortIndicatorGroup.includeInLayout = true;
sortIndicatorGroup.scaleY = (column.sortDescending) ? 1 : -1;
else
if (sortIndicatorInstance)
sortIndicatorGroup.removeElement(sortIndicatorInstance);
sortIndicatorGroup.includeInLayout = false;
sortIndicatorInstance = null;
private var chromeColorChanged:Boolean = false;
private var colorized:Boolean = false;
* @private
* Apply chromeColor style.
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
//trace("update display list");
// Apply chrome color
if (chromeColorChanged)
var chromeColor:uint = getStyle("chromeColor");
if (chromeColor != DEFAULT_COLOR || colorized)
colorTransform.redOffset = ((chromeColor & (0xFF << 16)) >> 16) - DEFAULT_COLOR_VALUE;
colorTransform.greenOffset = ((chromeColor & (0xFF << 8)) >> 8) - DEFAULT_COLOR_VALUE;
colorTransform.blueOffset = (chromeColor & 0xFF) - DEFAULT_COLOR_VALUE;
colorTransform.alphaMultiplier = alpha;
transform.colorTransform = colorTransform;
var exclusions:Array = [labelDisplay, sortIndicatorInstance];
// Apply inverse colorizing to exclusions
if (exclusions && exclusions.length > 0)
colorTransform.redOffset = -colorTransform.redOffset;
colorTransform.greenOffset = -colorTransform.greenOffset;
colorTransform.blueOffset = -colorTransform.blueOffset;
for (var i:int = 0; i < exclusions.length; i++)
var exclusionObject:Object = exclusions[i];
if (exclusionObject &&
(exclusionObject is DisplayObject ||
exclusionObject is GraphicElement))
colorTransform.alphaMultiplier = exclusionObject.alpha;
exclusionObject.transform.colorTransform = colorTransform;
colorized = true;
chromeColorChanged = false;
super.updateDisplayList(unscaledWidth, unscaledHeight);
* @private
override public function styleChanged(styleProp:String):void
var allStyles:Boolean = !styleProp || styleProp == "styleName";
super.styleChanged(styleProp);
if (allStyles || styleProp == "chromeColor")
chromeColorChanged = true;
invalidateDisplayList();
protected function managefilterField(event:MouseEvent):void
trace("double click sortIndicator : "+this.sortIndicatorInstance);
this.filterInput.visible=!this.filterInput.visible;
this.filterInput.includeInLayout=this.filterInput.visible;
this.filterSpacer.visible=this.filterInput.visible;
this.filterSpacer.includeInLayout=this.filterInput.visible;
if(!this.filterInput.visible)
this.filterInput.text="";
dispatchEvent(new ColumnFilteredEvent(ColumnFilteredEvent.COLUMNFILTERED_EVT,new FilterCriteria(this.column.dataField,this.filterInput.text)));
this.filterInput.setStyle("borderColor",0xFF6319);
this.filterInput.setStyle("focusColor",0xFF6319);
//this.filterInput.setStyle(
protected function onTextInputSelection(event:MouseEvent):void
event.stopImmediatePropagation();
this.filterInput.setStyle("borderColor",0xFF6319);
this.filterInput.setStyle("focusColor",0xFF6319);
protected function onKeyUp(event:KeyboardEvent):void
if(event.charCode==Keyboard.ENTER)
stage.focus=null;
protected function onFocusOut(event:FocusEvent):void
this.filterInput.setStyle("borderColor",0x00ff00);
this.filterInput.setStyle("focusColor",0x70B2EE);
dispatchEvent(new ColumnFilteredEvent(ColumnFilteredEvent.COLUMNFILTERED_EVT,new FilterCriteria(this.column.dataField,this.filterInput.text)));
]]>
</fx:Script>
<s:states>
<s:State name="normal" />
<s:State name="hovered" />
<s:State name="down" />
</s:states>
<!-- layer 1: shadow -->
<!--- @private -->
<s:Rect id="shadow" left="-1" right="-1" top="-1" bottom="-1" radiusX="2">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0x000000"
color.down="0xFFFFFF"
alpha="0.01"
alpha.down="0" />
<s:GradientEntry color="0x000000"
color.down="0xFFFFFF"
alpha="0.07"
alpha.down="0.5" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<!-- layer 2: fill -->
<!--- @private -->
<s:Rect id="fill" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0xFFFFFF"
color.hovered="0xBBBDBD"
color.down="0xAAAAAA"
alpha="0.85" />
<s:GradientEntry color="0xD8D8D8"
color.hovered="0x9FA0A1"
color.down="0x929496"
alpha="0.85" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<!-- layer 3: fill lowlight -->
<!--- @private -->
<s:Rect id="lowlight" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:LinearGradient rotation="270">
<s:GradientEntry color="0x000000" ratio="0.0" alpha="0.0627" />
<s:GradientEntry color="0x000000" ratio="0.48" alpha="0.0099" />
<s:GradientEntry color="0x000000" ratio="0.48001" alpha="0" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<!-- layer 4: fill highlight -->
<!--- @private -->
<s:Rect id="highlight" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0xFFFFFF"
ratio="0.0"
alpha="0.33"
alpha.hovered="0.22"
alpha.down="0.12"/>
<s:GradientEntry color="0xFFFFFF"
ratio="0.48"
alpha="0.33"
alpha.hovered="0.22"
alpha.down="0.12" />
<s:GradientEntry color="0xFFFFFF"
ratio="0.48001"
alpha="0" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<!-- layer 5: highlight stroke (all states except down) -->
<!--- @private -->
<s:Rect id="highlightStroke" left="0" right="0" top="0" bottom="0" excludeFrom="down">
<s:stroke>
<s:LinearGradientStroke rotation="90" weight="1">
<s:GradientEntry color="0xFFFFFF" alpha.hovered="0.22" />
<s:GradientEntry color="0xD8D8D8" alpha.hovered="0.22" />
</s:LinearGradientStroke>
</s:stroke>
</s:Rect>
<!-- layer 6: highlight stroke (down state only) -->
<!--- @private -->
<s:Rect id="hldownstroke1" left="0" right="0" top="0" bottom="0" includeIn="down">
<s:stroke>
<s:LinearGradientStroke rotation="90" weight="1">
<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.0" />
<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.001" />
<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.0011" />
<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.965" />
<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.9651" />
</s:LinearGradientStroke>
</s:stroke>
</s:Rect>
<!--- @private -->
<s:Rect id="hldownstroke2" left="1" right="1" top="1" bottom="1" includeIn="down">
<s:stroke>
<s:LinearGradientStroke rotation="90" weight="1">
<s:GradientEntry color="0x000000" alpha="0.09" ratio="0.0" />
<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.0001" />
</s:LinearGradientStroke>
</s:stroke>
</s:Rect>
<!--<s:Rect id="fill" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color.normal="0xf9f9f9" color.hovered="0xfcfdfa"
color.down="0xdceac2" alpha="0.85" />
<s:GradientEntry color.normal="0xeaeaea" color.hovered="0xdceac2"
color.down="0xd2e1b5" alpha="0.85" />
</s:LinearGradient>
</s:fill>
</s:Rect>-->
<!--<s:VGroup left="7" right="7" top="5" bottom="5" gap="6" verticalAlign="middle">
<s:TextInput width="100%" />
<s:HGroup width="100%">
<s:Group id="labelDisplayGroup" width="100%" />
<s:Group id="sortIndicatorGroup" includeInLayout="false" />
</s:HGroup>
</s:VGroup>-->
<s:VGroup verticalAlign="middle" left="7" top="5" right="7" bottom="5" gap="2" >
<s:TextInput id="filterInput" width="100%" visible="false" includeInLayout="false" keyUp="onKeyUp(event)" focusOut="onFocusOut(event)" click="onTextInputSelection(event)"/>
<s:Spacer id="filterSpacer" visible="false" includeInLayout="false" height="5" />
<s:HGroup width="100%" height="100%" verticalAlign="middle">
<s:Group id="labelDisplayGroup" width="100%" />
<s:Group id="sortIndicatorGroup" includeInLayout="false" />
</s:HGroup>
</s:VGroup>
</s:GridItemRenderer>Based on your idea, i've intercepted the click event and I use stopImmediatePropagation.
THen i added an image to sort the column. So if the image is clicked the sort is ok. -
How to make spark datagrid columns to behave like mx datagrid columns
Hello.
I have a problem with spark datagrid component. I can't force spark datagrid columns behave like old mx datagrid columns. In mx datagrid columns fills 100% of datagrid regardles of resizing column or datagrid itself (it will not show horizontal scrolling bar). In spark datagrid last column (colC) will never word wrap, event after setting horizontalScrollPolicy=off. I would like to somehow constrain spark columns to behave like mx ones.
App snippet (try to resize app and columns - especially colC - and you will see what I mean):
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<s:ArrayCollection id="dp">
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
<s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
</s:ArrayCollection>
</fx:Declarations>
<s:layout>
<s:HorizontalLayout/>
</s:layout>
<s:DataGrid id="grid" width="100%" height="100%" dataProvider="{dp}" variableRowHeight="true" horizontalScrollPolicy="off">
<s:columns>
<s:ArrayList>
<s:GridColumn headerText="Column A" dataField="colA"/>
<s:GridColumn headerText="Column B" dataField="colB"/>
<s:GridColumn headerText="Column C" dataField="colC"/>
</s:ArrayList>
</s:columns>
</s:DataGrid>
<mx:DataGrid id="grid2" width="100%" height="100%" dataProvider="{dp}" wordWrap="true" variableRowHeight="true">
<mx:columns>
<mx:DataGridColumn headerText="Column A" dataField="colA"/>
<mx:DataGridColumn headerText="Column B" dataField="colB"/>
<mx:DataGridColumn headerText="Column C" dataField="colC"/>
</mx:columns>
</mx:DataGrid>
</s:Application>the datagrid has sortItems and sortItemsOn methods you can use.
-
Binding two datagrid in one to many relationship
hello all,
I've my 2 object that rappresent that describe my XML file:
public class Page
public string PageName { get; set; }
public string Description { get; set; }
public ObservableCollection<Param> Params;
public class Param
public string Name { get; set; }
public string Address { get; set; }
public string Format { get; set; }
public string Description { get; set; }
The first datagrid, is populated in this way:
<Window x:Class="DataGridXML2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
DataContext="{Binding Main, Source={StaticResource Locator}}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="400*" />
</Grid.ColumnDefinitions>
<DataGrid Name="grid1"
ItemsSource="{Binding Pages}"
SelectedItem="{Binding SelectedPage}"
AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="pageName" Binding="{Binding PageName}"/>
<DataGridTextColumn Header="description" Binding="{Binding Description}"/>
</DataGrid.Columns>
</DataGrid >
</Grid>
</Window>
I'm in difficulty, I would show in a second grid list of parameters contained in the list "Params" by the selection of the item of the first grid. My ViewModel is :
namespace DataGridXML2.ViewModel
public class MainViewModel : ViewModelBase
private readonly IConfigService configService;
#region Pages
private ObservableCollection<Page> pages;
public ObservableCollection<Page> Pages
get { return pages; }
set
pages = value;
RaisePropertyChanged(() => Pages);
#endregion
#region SelectedPage
private Page selectedPage;
public Page SelectedPage
get
return selectedPage;
set
selectedPage = value;
RaisePropertyChanged(() => SelectedPage);
#endregion
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IConfigService configService)
this.configService = configService;
pages = configService.GetPages(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Visual Studio 2013\Projects\Binding\DataGridXML2\TEST.xml");
thanks in advanceNot sure if I'm missing something.
Isn't it just a matter of:
<DataGrid Name="grid2"
ItemsSource="{Binding SelectedPage.Params}"
Hope that helps.
Technet articles: Uneventful MVVM;
All my Technet Articles -
Our WPF application uses DataGrid.
One of request is that first column of DataGrid does not show row separator and also does not show Left column separator. So it looks like the first column does not belong to the DataGrid. However, when select a row, the cell of first column still get selected.
How do we make it? Thx!
JaneCHi Magnus,
Thanks for replying our question and provide your solution!
Your solution works by setting "HorizontalGridLinesBrush" and "VerticalGridLinesBrush" to {x:Null} in the DataGrid style and modify "CellStyle" in first column as following:
<DataGridTextColumn MinWidth="32"
Binding="{Binding CellName}"
CanUserReorder="False"
CanUserSort="False"
Header="Cell}"
IsReadOnly="true" >
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="False"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border BorderThickness="0" BorderBrush="{x:Null}"
Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Margin="-1">
<Grid Background="{TemplateBinding Background}" VerticalAlignment="Center" Height="42">
<ContentPresenter VerticalAlignment="Center"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
We found another way to achieve it by using DataGridRowHeader. The good way to use DataGridRowHeader is that we do not need to make the first column ReadOnly (click on first column does not select whole row anymore). Select RowHeader in a row will select
whole row. Move scroll bar horizontally, the row header still keep in visible area.
<Style TargetType="{x:Type DataGridRowHeader}" x:Key="dataGridRowHeaderStyle">
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Height" Value="42" />
<Setter Property="SeparatorBrush" Value="{x:Null}" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridRowHeader}">
<Grid>
<Border x:Name="rowHeaderBorder"
BorderThickness="0"
Padding="3,0,3,0"
Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
BorderBrush="{x:Null}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataGrid>
<DataGrid.RowHeaderStyle>
<Style TargetType="DataGridRowHeader" BasedOn="{StaticResource dataGridRowHeaderStyle}">
<Setter Property="Content" Value="{Binding CellName}" />
<Setter Property="Width" Value="35"/>
</Style>
</DataGrid.RowHeaderStyle>
</<DataGrid>
JaneC -
How to bind several data (more then 7300) to datagrid
Hello,
I am trying to bind to datagrid several data. I created an observablecollection, i stocked data into this collection and then i binded this collection to my datagrid. In xaml file i declared my datacontext. When i did it my visual studio and all application
on my computer clock. I can't do anything. A simple think that i can do, is to close session and restart .
I need help.
Here is some sample:
code cs ViewModel:
using System;
using System.Collections.Generic;
using System.Text;
using GestionDeContrats_Offres_ClientsGUI.VueModele;
using System.Collections.ObjectModel;
using System.Windows.Data;
using System.ComponentModel;
using GestionDeContrats_Offres_Clients.GestionOffres;
using GestionDeContrats_Offres_Clients.GestionContrats;
using System.Windows.Input;
using GestionDeContrats_Offres_Clients.GestionModele;
using GestionDeContrats_Offres_ClientsGUI.crm;
using System.Data;
namespace GestionDeContrats_Offres_ClientsGUI.VueModele
/// <summary>
/// </summary>
public class GestionDeContratVueModele : VueModeleBase
private readonly ObservableCollection<ContratVueModele> contrats;
private readonly PagingCollectionView pagingView;
private GestionDeContrat gestiondecontrat;
/// <summary>
/// Constructeur de la classe
/// GestionDeContratVueModele
/// </summary>
public GestionDeContratVueModele() {
try
this.gestiondecontrat = new GestionDeContrat();
this.contrats = new ObservableCollection<ContratVueModele>();
this.contrats.Clear();
foreach (contract contrat in this.gestiondecontrat.ListeDeContrat())
// this.contrats.Add(new ContratVueModele());
this.contrats.Add(new ContratVueModele() { NOMDUCONTRAT = contrat.title, DATEDEDEBUT = contrat.activeon.Value, DATEDEFIN
= contrat.expireson.Value, LESTATUT = contrat.statecode.formattedvalue,LESTATUTAVANT=contrat.access_etatavant.name });
this.pagingView = new PagingCollectionView(this.contrats, 3);
if (this.pagingView == null)
throw new NullReferenceException("pagingView");
this.currentpage = this.pagingView.CurrentPage;
this.pagingView.CurrentChanged += new EventHandler(pagingView_CurrentChanged);
catch(System.Web.Services.Protocols.SoapException soapEx){
soapEx.Detail.OuterXml.ToString();
/// <summary>
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void pagingView_CurrentChanged(object sender, EventArgs e)
OnPropertyChanged("SelectedContrat");
Dispose();
//throw new NotImplementedException();
/// <summary>
/// Propriété permettant de manipuler la
///Vue Modèle de la liste des contrats
/// </summary>
public ObservableCollection<ContratVueModele> Lescontrats
get
return this.contrats;
code xaml:
<UserControl x:Class="GestionDeContrats_Offres_ClientsGUI.VueModele.UserControlGestionContrat"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
x:Name="GestionContrat"
xmlns:local="clr-namespace:GestionDeContrats_Offres_ClientsGUI.VueModele"
d:DesignHeight="300" >
<UserControl.DataContext>
<local:GestionDeContratVueModele />
</UserControl.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="40"/>
<RowDefinition />
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="320"/>
<ColumnDefinition Width="40" />
</Grid.ColumnDefinitions>
<TextBox Name="searchtexbox" Grid.Column="0"/>
<Image Grid.Column="1" Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/16_find.gif" />
</Grid>
<ToolBar Grid.Row="1" Name="toolbarcontrat">
<Button Name="btNewContrat" Click="btNewContrat_Click">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/plusvert.jpg" />
<Label Content="Nouveau" Grid.Column="1"/>
</Grid>
</Button>
<Button Name="btCopierContrat" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/editcopy.png" />
<Label Content="Copier" Grid.Column="1"/>
</Grid>
</Button>
<Button Name="btSupprimerContrat" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/delgreen16.jpg" />
<Label Content="Supprimer" Grid.Column="1"/>
</Grid>
</Button>
<Button Name="btModifierContrat" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/ico_18_4207.gif" />
<Label Content="Modifier" Grid.Column="1"/>
</Grid>
</Button>
</ToolBar>
<DataGrid Name="listViewContrat" Grid.Row="2" ItemsSource="{Binding Path=Lescontrats, Mode=OneWay}" IsSynchronizedWithCurrentItem="True" AutoGenerateColumns="False"
CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserSortColumns="True" CanUserAddRows="True" CanUserDeleteRows="True">
<DataGrid.Columns>
<DataGridTemplateColumn Header="Nom du contrat" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=NOMDUCONTRAT, Mode=OneWay}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Date de début" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DATEDEDEBUT, Mode=OneWay}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Date de fin" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DATEDEFIN, Mode=OneWay}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Statut" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=LESTATUT,Mode=OneWay}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Statut avant" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text=""/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Row="3" Orientation="Horizontal">
<Label Margin="2" Content=""/>
<Button Content="Suivant" Name="btNext" Margin="2" />
<Button Content="Précédent" Name="btPrevious" Margin="2" />
</StackPanel>
</Grid>
</UserControl>
I include link to this usercontrol into MainWindow.xaml.
Thanks
RegardsI think what darnold was trying to say....
Those very clever people who come up with insights on human behaviour have studied how many records a user can work with effectively.
It turns out that they can't see thousands of records at once.
Their advice is that one presents a maximum of 200-300 records at a time.
What with maybe 40 fitting on a screen at a time. Few people like spending 20 minutes scrolling through a stack of data they're not interested in to find the one record they're after.
Personally, I would use a treeview, set of combos or some such so the user can select what subset they are interested in and present just that.
Anyhow.
If you have a viewmodel which exposes an observable collection<t> as a public property you can bind the itemssource of a datagrid to that.
Although UI controls have thread affinity, the objects in such a collection do not.
That means you can use another thread to go get your data, add it to the observable collection, the fact it's an observable collection tells the view as records are added and it will show them. The ui will remain responsive.
You can do this using skip and take to read a couple hundred records at a time and add those, pause and repeat for the next couple hundred records. Use linq - skip and take.
Please don't forget to upvote posts which you like and mark those which answer your question.
My latest Technet article - Dynamic XAML -
How to bind an element in an arrayList to a table column
Hi everyone, I need your help.
I have an ObjectListDataProvider to bind a class MyClass to a table. Inside of MyClass, there is a property called dynNumOfElements of type ArrayList. I need dynamically create the columns of the table to match the number of elements in ArrayList, and bind each element in the ArrayList to a column.
However I dont know how to do it? It is going to be something like createValueBinding("#{currentRow.value(['dynNumOfElements[1]']}"). Obviously this does not work.
Can you tell me a way to solve this problem?
Is it possible to bind a column to an element in a collection?
Thanks in advanceThanks Winston,
Following is what I did. They are all in Page1.jsp
public String getMyData(){
// Make sure to check for nulls
return myList.get(count++).toString();
private ArrayList myList = new ArrayList();
private int count = 0;
public String button3_action() {
// TODO: Replace with your code
//initialize list
myList.add("string 1");
myList.add("Stirng 2");
myList.add("string 3");
TableColumn tc1 = new TableColumn();
tc1.setId("tc1");
tc1.setHeaderText("tc1");
tableRowGroup2.getChildren().add(tc1);
StaticText st1 = new StaticText();
st1.setValueBinding("text", getApplication().createValueBinding("#{Page1.myData}"));
tc1.getChildren().add(st1);
return null;
The error message is "Error getting property 'getMyData' from bean of type helloweb.Page1"
Can you help me to fix the problem? Thanks a lot. -
How to bind XML to Datagrid?
My xml is here:
<?xml version="1.0"?><ITRequests><CallInfo><id type="INT UNSIGNED">42</id><request_no type="VARCHAR">1313_IT_220520100709</request_no><requester_uid type="VARCHAR">administrator</requester_uid><request_date type="VARCHAR">22-May-2010 07:09:34 PM</request_date><title type="VARCHAR">Printer Installation</title><status type="VARCHAR">Closed</status></CallInfo><CallInfo><id type="INT UNSIGNED">43</id><request_no type="VARCHAR">1314_IT_220520100718</request_no><requester_uid type="VARCHAR">administrator</requester_uid><request_date type="VARCHAR">22-May-2010 07:17:49 PM</request_date><title type="VARCHAR">Software Installation</title><status type="VARCHAR">In Progress</status></CallInfo><CallInfo></ITRequests>
I don't know how to bind this to a simple datagrid.
Can someone help me please?
PS: The data is in a String variable.
Thanks,
NithGetting your data in the form a string is a PITA. Can you just use the XML itself, and convert it to an ArrayCollection? Then you could just use an HTTP request, for instance, to retrieve it.
Anyway, here is the code you need. It also demonstrates using E4X syntax to filter out the root node.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"creationComplete="initApp()"
>
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.ArrayCollection;
private var strData:String = "<?xml version='1.0'?><ITRequests><CallInfo><id type='INT UNSIGNED'>42</id><request_no type='VARCHAR'>1313_IT_220520100709</request_no><requester_uid type='VARCHAR'>administrator</requester_uid><request_date type='VARCHAR'>22-May-2010 07:09:34 PM</request_date><title type='VARCHAR'>Printer Installation</title><status type='VARCHAR'>Closed</status></CallInfo><CallInfo><id type='INT UNSIGNED'>43</id><request_no type='VARCHAR'>1314_IT_220520100718</request_no><requester_uid type='VARCHAR'>administrator</requester_uid><request_date type='VARCHAR'>22-May-2010 07:17:49 PM</request_date><title type='VARCHAR'>Software Installation</title><status type='VARCHAR'>In Progress</status></CallInfo></ITRequests>";[
Bindable]
private var acData:ArrayCollection;
private function initApp():void{ getCallInfo();
private function getCallInfo():void{
//Convert string to XML:
var sxml:XML = new XML(strData);
//Create an ArrayCollection.
//Just get the 'CallInfo' nodes (ignoring the root node, 'ITRequests'):
acData =
new ArrayCollection(new XMLListCollection(new XMLList(sxml..CallInfo)).toArray());
trace(acData);}
]]>
</mx:Script>
<mx:DataGrid
dataProvider="{acData}">
<mx:columns>
<mx:DataGridColumn dataField="id" width="50"/>
<mx:DataGridColumn dataField="request_no" width="180"/>
</mx:columns></mx:DataGrid>
</mx:Application> -
How to import data from CSV file with columns separated by semicolon?
I migrate database from MS SQL 2008 to ORACLE 11g
I export data to CSV file from MS SQL
then I try to import it to Oracle
several tables goes fine using Import data option in the SQL Developer
Standard CSV files with data separated by comma were imported.
chars, date (with format string), and integer data are imported via import wizard without problems
the problems were when I try to import table with noninteger numbers with modal part separated by comma not by dot
comma is the standard separator for columns in CSV file
so I must change the standard separator to semicolon
then the import wizard have problem to correct recognize the columns data because it use only standard CSV comma separator :-/
In SQL Developer 1.5.3 Tools -> Preferences -> Migration -> Data Move Options
I change "End of Column Delimiter" to ; but it doens't work
Is this possible to change the standard column separator for import data wizzard in SQL Developer 1.5.3?
Or maybe someone know how to import data in SQL Developer 1.5.3 from CSV when CSV colunn separator is set to semicolon?A new preference has been added to customize the import delimiter in main code line. This should be available as part of future release.
-
How do I put all my live feeds into one channel? I don't want to have to click on each feed source separately. Instead of one feed per website I want just ONE feed for all my sources together.
Hi there old45,
You may find the information in the article below helpful.
iTunes 11 for Windows: Change where your iTunes files are stored
http://support.apple.com/kb/PH12365
Consolidate your files in the iTunes folder
You can consolidate all the files in your library in the iTunes folder—for example, to make it easier to move your library to a new computer.
Choose File > Library > Organize Library.
Select “Consolidate files.”Files remain in their original locations, and copies are placed in the iTunes folder.
To create folders (Music, Movies, TV Shows, Podcasts, Audiobooks, and so on) inside your iTunes folder, and place all your imported media files in the appropriate folders, select “Reorganize files in the folder ‘iTunes Media.’”
Locate your iTunes files
Do either of the following:
Find out where a file is stored: Select the item in iTunes, and choose File > Get Info. The path to the file is shown at the bottom of the Summary pane (next to Where).
Show the file in Windows Explorer: Select the song, and choose File > Show in Explorer.
-Griff W. -
How can i design square signal which having a positive and negative values equal to each other and separated from each other by controlled time or distance, As it is shown in the figure below. and enter this signal in a daq.
Solved!
Go to Solution.By the time you spend for the nice diadram you might have done the vi
Your DAQ like to have a waveform (array of values and dt ak 1/samplerate)
If you set the samplerate you know the array length , create a array of zeros, and set the values of both amplitudes ...
Since I don't want to wire others homework here are some pictures
And there are some drawbacks is room for improvement in my solution, just think of rounding errors ... and what might happen if the arrays get bigger ....
Spoiler (Highlight to read)
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ' -
How can i select other column values('-' separated) in group by function
CREATE TABLE EMP (
EMPNO NUMBER(4) NOT NULL,
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
SAL NUMBER(7)
INSERT INTO EMP(EMPNO, ENAME, JOB, SAL) VALUES (7369, 'SMITH', 'CLERK', 800);
INSERT INTO EMP(EMPNO, ENAME, JOB, SAL) VALUES (7499, 'SMITH', 'SALESMAN', 1600);
INSERT INTO EMP(EMPNO, ENAME, JOB, SAL) VALUES (7521, 'ALLEN', 'SALESMAN', 2400);
In Output I want 3 columns : EMP,SUM(SAL),JOB(hyphenSeparated)
Means i want my output like
First row : SMITH,2400,CLERK-SALESMAN
Second row : ALLEN,2400,SALESMAN
I tried to write following sql : select ename,sum(sal) from emp group by ename
But i want other colummn value in '-' separated. but group by is only allowing agreegated function.
How can i select other column value using group by function.SQL> select ename,sum(sal), listagg(job, '-') within group (order by job) as job from emp group by ename;
ENAME SUM(SAL) JOB
ALLEN 2400 SALESMAN
SMITH 2400 CLERK-SALESMANnote: LISTAGG is a feature of 11.2 -
How to define a dynamic column to count the quarter of each year?
Lets see the result that now displayed:
YEARS MONTHS SUMMONTH SUMYEAR SUMQUARTER
2009 Jan 127994 1766166 449652
2009 Feb 168106 1766166 449652
2009 Mar 153552 1766166 449652
2009 Apr 160329 1766166 438913
2009 May 137605 1766166 438913
2009 Jun 140979 1766166 438913
2009 Jul 148606 1766166 435283
2009 Aug 150390 1766166 435283
2009 Sep 136287 1766166 435283
2009 Oct 149529 1766166 442318
2009 Nov 153268 1766166 442318
2009 Dec 139521 1766166 442318
2010 Jan 124670 1721212 407181
2010 Feb 139278 1721212 407181
2010 Mar 143233 1721212 407181
2010 Apr 149518 1721212 444112
2010 May 152292 1721212 444112
2010 Jun 142302 1721212 444112
2010 Jul 149125 1721212 412855
2010 Aug 130328 1721212 412855
2010 Sep 133402 1721212 412855
2010 Oct 157754 1721212 457064
2010 Nov 137078 1721212 457064
2010 Dec 162232 1721212 457064
The problem is about how to dynamic a new column called "Q_count" to count each displayed row belong to which quarter of year??
In addition, it will repeat again from next year.
For example:
*2009 Jan-Mar will display "q1", Apr-Jun will display "q2".....and for 2010 Jan-Mar, it will display "q1" again and so on.*
Here is my sql that I am using:
select years,months,summonth,sumyear,sumquarter
from(
select years,months,summonth,sumyear,
sum(sumhour) over(partition by years || to_char(ym, 'Q') order by years || to_char(ym, 'Q')) sumquarter,ym
from(
select years, months, days, hours, mins, sumHour, SUM (sumHour) OVER (PARTITION BY years,months,days) sumDay, SUM (sumHour) OVER (PARTITION BY years,months) sumMonth, SUM (sumHour) OVER (PARTITION BY years) sumyear,
to_date(years || months, 'YYYYMon', 'NLS_DATE_LANGUAGE=American') ym
from (SELECT x.years, x.months, x.days, x.hours, x.mins, sum(x.value) as sumHour
FROM xmltest,
XMLTABLE ('$d/cdata/name' passing xmldoc as "d"
COLUMNS
years integer path 'year',
months varchar(3) path 'month',
days varchar(2) path 'day',
hours varchar(2) path 'hour',
mins varchar(2) path 'minute',
value float path 'value'
) as X
group by x.years, x.months, x.days, x.hours, x.mins
order by x.years, x.months, x.days
group by years,months,summonth,sumyear,sumquarter,ym
order by ymThanks everyone helps me!!!If my understanding is correct..
select years,months,summonth,sumyear,sumquarter,qtr
from(
select years,months,summonth,sumyear,to_char(ym, 'Q') qtr,
sum(sumhour) over(partition by years || to_char(ym, 'Q') order by years || to_char(ym, 'Q')) sumquarter,ym
from(
select years, months, days, hours, mins, sumHour,
SUM (sumHour) OVER (PARTITION BY years,months,days) sumDay,
SUM (sumHour) OVER (PARTITION BY years,months) sumMonth,
SUM (sumHour) OVER (PARTITION BY years) sumyear,
to_date(years || months, 'YYYYMon', 'NLS_DATE_LANGUAGE=American') ym
from (
SELECT x.years, x.months, x.days, x.hours, x.mins, sum(x.value) as sumHour
FROM xmltest,
XMLTABLE ('$d/cdata/name' passing xmldoc as "d"
COLUMNS
years integer path 'year',
months varchar(3) path 'month',
days varchar(2) path 'day',
hours varchar(2) path 'hour',
mins varchar(2) path 'minute',
value float path 'value'
) as X
group by x.years, x.months, x.days, x.hours, x.mins
order by x.years, x.months, x.days
order by ymEdited by: jeneesh on Mar 26, 2012 5:49 PM
Removed unnecessary GROUP BY -
how can I customize each content page separately, so that if I change one chapter, it won't affect the next?
I don't think you can do what you want to do, sorry.
See: Publishing With iBooks Author
http://shop.oreilly.com/product/0636920025597.do
Maybe you are looking for
-
How to create a group list in the directoty of contacts?
How do I make a group to text or email from some of my contacts?
-
Creating address labels of various sizes
I want to be able to create labels that fit standard blank labels that are produced by Avery. For example, a page of ten 2" X 4" white blank mailing labels can be filled out using the proper template layout that MS Word provides. Does anyone know how
-
Just bought my first iPad and can't seem to connect even in the house. Have verified the netgear password but it won't let me connect..any ideas?
-
Searching of Single Quote( ' ) in DataBase
How do I use like statement to find a character " ' " ? I used the following syntax select * from table where col1 like '%'%' ; but it gives a error SQL statement not properly ended. So how to search for a single quote( ' ) in a String
-
my aunt's husband passed away and took his apple ID and password with him. how do you reset a apple ID password?