WPF DataGrid RowHeader databinding

I tried both answers, and neither worked for me. Essentially what I had to do was mix them together. This works for me: <DataGrid name=”ui_dataGrid> <DataGrid.RowHeaderTemplate> <DataTemplate> <TextBlock Text=”{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGridRow}}, Path=Item.Header}”/> </DataTemplate> </DataGrid.RowHeaderTemplate> </DataGrid> The trick is to find the ancestor DataGridRow, then Bind the TextBlock.Text attribute to its Item’s property that … Read more

MS SQL 2008 – get all table names and their row counts in a DB

SELECT sc.name +’.’+ ta.name TableName ,SUM(pa.rows) RowCnt FROM sys.tables ta INNER JOIN sys.partitions pa ON pa.OBJECT_ID = ta.OBJECT_ID INNER JOIN sys.schemas sc ON ta.schema_id = sc.schema_id WHERE ta.is_ms_shipped = 0 AND pa.index_id IN (1,0) GROUP BY sc.name,ta.name ORDER BY SUM(pa.rows) DESC See this: SQL SERVER – Find Row Count in Table – Find Largest Table … Read more

Highlight ListView selected row

Other solution (mostly in XML) 1) set the choiceMode of the ListView to singleChoice <ListView android:choiceMode=”singleChoice” …/> 2) Items of the list must be a Checkable View and use a Color State List as Background eg: album_item.xml <?xml version=”1.0″ encoding=”utf-8″?> <CheckedTextView xmlns:android=”http://schemas.android.com/apk/res/android” android:background=”@drawable/list_selector” …/> 3) the background Color State (list_selector.xml) defines the highlight color <?xml … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)