Search Results

Search found 7127 results on 286 pages for 'calculated columns'.

Page 74/286 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • 7 Tips For Creating the Perfect Title Tag For Your Website

    Title tags are the first line of clickable text that shows up in the search engine results. They also carry huge weight with search engines when rankings are calculated. These two facts combined make title tags one of the most important on page optimisations you can make for your entire website.

    Read the article

  • Android layout issue - relative widths in percent using weight

    - by cdonner
    I am trying to assign relative widths to columns in a ListView that is in a TabHost, using layout_weight as suggested here: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TableLayout android:id="@+id/triplist" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="4px"> <TableRow> <ListView android:id="@+id/triplistview" android:layout_width="fill_parent" android:layout_height="wrap_content"/> </TableRow> <TableRow> <Button android:id="@+id/newtripbutton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Add Trip"/> </TableRow> [other tabs ...] My row definition has 4 columns that I would like to size as follows: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:weightSum="1.0" android:padding="4px"> <TextView android:id="@+id/rowtripdate" android:layout_weight=".2" android:layout_width="0dip" android:layout_height="wrap_content" android:inputType="date"/> <TextView android:id="@+id/rowodostart" android:layout_weight=".2" android:layout_width="0dip" android:layout_height="wrap_content"/> <TextView android:id="@+id/rowodoend" android:layout_weight=".2" android:layout_width="0dip" android:layout_height="wrap_content"/> <TextView android:id="@+id/rowcomment" android:layout_weight=".4" android:layout_width="0dip" android:layout_height="wrap_content"> Unfortunately, it seems to want to fit all the columns into the space that the button occupies, as opposed to the width of the screen. Or maybe there is another constraint that I do not understand. I'd appreciate your help.

    Read the article

  • Cocoa equivalent of the Carbon method getPtrSize

    - by Michael Minerva
    I need to translate the a carbon method into cocoa into and I am having trouble finding any documentation about what the carbon method getPtrSize really does. From the code I am translating it seems that it returns the byte representation of an image but that doesn't really match up with the name. Could someone give me a good explanation of this method or link me to some documentation that describes it. The code I am translating is in a common lisp implementation called MCL that has a bridge to carbon (I am translating into CCL which is a common lisp implementation with a Cocoa bridge). Here is the MCL code (#_before a method call means that it is a carbon method): (defmethod COPY-CONTENT-INTO ((Source inflatable-icon) (Destination inflatable-icon)) ;; check for size compatibility to avoid disaster (unless (and (= (rows Source) (rows Destination)) (= (columns Source) (columns Destination)) (= (#_getPtrSize (image Source)) (#_getPtrSize (image Destination)))) (error "cannot copy content of source into destination inflatable icon: incompatible sizes")) ;; given that they are the same size only copy content (setf (is-upright Destination) (is-upright Source)) (setf (height Destination) (height Source)) (setf (dz Destination) (dz Source)) (setf (surfaces Destination) (surfaces Source)) (setf (distance Destination) (distance Source)) ;; arrays (noise-map Source) ;; accessor makes array if needed (noise-map Destination) ;; ;; accessor makes array if needed (dotimes (Row (rows Source)) (dotimes (Column (columns Source)) (setf (aref (noise-map Destination) Row Column) (aref (noise-map Source) Row Column)) (setf (aref (altitudes Destination) Row Column) (aref (altitudes Source) Row Column)))) (setf (connectors Destination) (mapcar #'copy-instance (connectors Source))) (setf (visible-alpha-threshold Destination) (visible-alpha-threshold Source)) ;; copy Image: slow byte copy (dotimes (I (#_getPtrSize (image Source))) (%put-byte (image Destination) (%get-byte (image Source) i) i)) ;; flat texture optimization: do not copy texture-id -> destination should get its own texture id from OpenGL (setf (is-flat Destination) (is-flat Source)) ;; do not compile flat textures: the display list overhead slows things down by about 2x (setf (auto-compile Destination) (not (is-flat Source))) ;; to make change visible we have to reset the compiled flag (setf (is-compiled Destination) nil))

    Read the article

  • Help with SqlCeChangeTracking

    - by MusiGenesis
    I'm trying to use a new class in SqlCe 3.5 SP2 called SqlCeChangeTracking. This class (allegedly) lets you turn on change tracking on a table, without using RDA replication or Sync Services. Assuming you have an open SqlCeConnection, you enable change tracking on a table like this: SqlCeChangeTracking tracker = new SqlCeChangeTracking(conn); tracker.EnableTracking(TableName, TrackingKeyType.PrimaryKey, TrackingOptions.All); This appears to work, sort of. When I open the SDF file and view it in SQL Server Management Studio, the table has three additional fields: __sysChangeTxBsn, __sysInsertTxBsn and __sysTrackingContext. According to the sparse documentation, these columns (along with the __sysOCSDeletedRows system table) are used to track changes. The problem is that these three columns always contain NULL values for all rows, no matter what I do. I can add, delete, edit etc. and those columns remain NULL no matter what (and no deleted records ever show up in __sysOCSDeletedRows). I have found virtually no documentation on this class at all, and the promised MSDN API appears non-existent. Anybody know how to use this class?

    Read the article

  • Flash Builder (Flex 4): datagrid populated by XML, how can I add an image in some of the rows?

    - by ufk
    I have a DataGrid table with columns name, phone. In column name I would like to add a picture near the name of the person. How can I add a picture in a datagrid row? <fx:Declarations> <fx:XMLList id="people" xmlns=""> <test> <name>moshe</name> <phone>555</phone> </test> </fx:XMLList> </fx:Declarations> <mx:DataGrid id="dg" color="0x323232" width="532" rowCount="10" top="10" left="10" DataProvider="{people}"> <mx:columns> <mx:DataGridColumn dataField="name" headerText="person name"/> <mx:DataGridColumn dataField="phone" headerText="phone"/> </mx:columns> </mx:DataGrid>

    Read the article

  • Extjs Dynamic Grid

    - by rkenshin
    Hi, I'm trying to create a dynamic grid using Extjs. The grid is built and displayed when a click event is fired then an ajax request is sent to the server to fetch the columns, records and records definition a.k.a Store Fields. Each node could have different grid structure and that depends on the level of the node in the tree. The only way i came up with so far is function showGrid(response, request) { var jsonData = Ext.util.JSON.decode(response.responseText); var grid = Ext.getCmp('contentGrid'+request.params.owner); if(grid) { grid.destroy(); } var store = new Ext.data.ArrayStore({ id : 'arrayStore', fields : jsonData.recordFields, autoDestroy : true }); grid = new Ext.grid.GridPanel({ defaults: {sortable:true}, id:'contentGrid'+request.params.owner, store: store, columns: jsonData.columns, //width:540, //height:200, loadMask: true }); store.loadData(jsonData.records); if(Ext.getCmp('tab-'+request.params.owner)) { Ext.getCmp('tab-'+request.params.owner).show(); } else { grid.render('grid-div'); Ext.getCmp('card-tabs-panel').add({ id:'tab-'+request.params.owner, title: request.params.text, iconCls:'silk-tab', html:Ext.getDom('grid-div').innerHTML, closable:true }).show(); } } The function above is called when a click event is fired 'click': function(node) { Ext.Ajax.request({ url: 'showCtn', success: function(response, request) { alert('Success'); showGrid(response,request); }, failure: function(results, request) { alert('Error'); }, params: Ext.urlDecode(node.attributes.options); } The problem i'm getting with this code is that a new grid is displayed each time the showGrid function is called. The end user sees the old grids and the new one. To mitigate this problem, I tried destroying the grid and also removing the grid element on each request, and that seems to solve the problem only that records never get displayed this time. if(grid) { grid.destroy(true); } The behavior i'm looking for is to display the result of a grid within a tab and if that tab exists replaced the old grid. Any help is appreciated. Thank you

    Read the article

  • How to Choose Fields While Using ExportToExcel in jqGrid ?

    - by João Guilherme
    Hi ! I have this jqGrid <trirand:JQGrid runat="server" ID="JQGrid1" OnRowEditing="JQGrid1_RowEditing" RenderingMode="Optimized" oncellbinding="JQGrid1_CellBinding" Height="350" EditUrl="/Ferramenta/Transacoes/TransacoesT.aspx"> <AppearanceSettings HighlightRowsOnHover="true"/> <Columns> <trirand:JQGridColumn DataField="IdLancamento" PrimaryKey="True" Visible="false" /> <trirand:JQGridColumn DataField="IdCategoria" Visible="false" /> <trirand:JQGridColumn DataField="DataLancamento" Editable="true" DataFormatString="{0:dd/MM/yy}" HeaderText="Data" Width="65" TextAlign="Center" CssClass="font_data" /> <trirand:JQGridColumn DataField="Descricao" Editable="true" HeaderText="Descrição" Width="330" /> <trirand:JQGridColumn DataField="NomeCategoria" Editable="true" EditType="DropDown" EditorControlID="ddlCategorias" HeaderText="Categoria"> <Formatter> <trirand:CustomFormatter FormatFunction="DefineUrl" /> </Formatter> </trirand:JQGridColumn> <trirand:JQGridColumn DataField="Valor" Editable="false" DataFormatString="{0:C}" HeaderText="Valor" Width="80" TextAlign="Center" /> </Columns> <ClientSideEvents RowSelect="editRow" /> <PagerSettings PageSize="20" /> <ToolBarSettings ShowEditButton="false" ShowRefreshButton="True" ShowAddButton="false" ShowDeleteButton="false" ShowSearchButton="false" /> <SortSettings InitialSortColumn=""></SortSettings> </trirand:JQGrid> <asp:LinkButton ID="lbExportar" runat="server" onclick="lbExportar_Click">Exportar todas as transações</asp:LinkButton> When I use the method ExportToExcel JQGrid1.ExportToExcel("export.xls"); it includes the first column IdLancamento that is not visible and also includes another column that is used on the query. Is it possible to choose the columns that are going to be exported ?

    Read the article

  • Rails App hangs after few requests

    - by Paddy
    I have Bitnami Rails stack installed on my Mac. To better explain my problem i created a simple scaffold based rails app with mysql as the backend. I can get to perform simple POST and GET requests for a while and after a few requests the app just hangs indefinitely. No exception caught or anything worthwhile in the development log to report this strange behavior. This is the last bit from the development log before the app froze: Processing WritedatasController#index (for 127.0.0.1 at 2010-03-30 20:38:51) [GET] [4;36;1mWritedata Load (0.7ms) [0m [0;1mSELECT * FROM `writedatas` [0m Rendering template within layouts/application Rendering writedatas/index [4;35;1mWritedata Columns (2.9ms) [0m [0mSHOW FIELDS FROM `writedatas` [0m Completed in 99ms (View: 88, DB: 4) | 200 OK [http://localhost/writedatas] [4;36;1mSQL (0.2ms) [0m [0;1mSET NAMES 'utf8' [0m [4;35;1mSQL (0.1ms) [0m [0mSET SQL_AUTO_IS_NULL=0 [0m Processing WritedatasController#new (for 127.0.0.1 at 2010-03-30 20:38:52) [GET] [4;36;1mWritedata Columns (2.0ms) [0m [0;1mSHOW FIELDS FROM `writedatas` [0m Rendering template within layouts/application Rendering writedatas/new Rendered writedatas/_form (5.9ms) Completed in 34ms (View: 25, DB: 2) | 200 OK [http://localhost/writedatas/new] [4;36;1mSQL (0.4ms) [0m [0;1mSET NAMES 'utf8' [0m [4;35;1mSQL (0.1ms) [0m [0mSET SQL_AUTO_IS_NULL=0 [0m Processing WritedatasController#index (for 127.0.0.1 at 2010-03-30 20:39:17) [GET] [4;36;1mWritedata Load (0.7ms) [0m [0;1mSELECT * FROM `writedatas` [0m Rendering template within layouts/application Rendering writedatas/index [4;35;1mWritedata Columns (2.6ms) [0m [0mSHOW FIELDS FROM `writedatas` [0m Completed in 101ms (View: 90, DB: 4) | 200 OK [http://localhost/writedatas] It just hung at this point. And after this happens i have to restart the server, for it to hang again after few requests. This is the weirdest problem i have faced and i am truly stumped.

    Read the article

  • Ruby on Rails export to csv - maintain mysql select statement order

    - by zekial
    Exporting some data from mysql to a csv file using FasterCSV. I'd like the columns in the outputted CSV to be in the same order as the select statement in my query. Example: rows = Data.find( :all, :select=>'name, age, height, weight' ) headers = rows[0].attributes.keys FasterCSV.generate do |csv| csv << headers rows.each do |r| csv << r.attributes.values end end CSV Output: height,weight,name,age 74,212,bob,23 70,201,fred,24 . . . I want the CSV columns in the same order as my select statement. Obviously the attributes method is not going to work. Any ideas on the best way to ensure that the columns in my csv file will be in the same order as the select statement? Got a lot of data and performance is an issue. The select statement is not static. I realize I could loop through column names within the rows.each loop but it seems kinda dirty.

    Read the article

  • Crawler do not create custom crawled properties

    - by user173739
    These days i have faced with very strange problem. I have development environment with MOSS 2007 SP 2 and WS 2008, i have search configured and everything works great. I have started to configuring staging environment (MOSS 2007 SP2 with June CU) and create new farm and new SSP. I have deployed my changes with package (wsp) and manually create site collections, sub webs, pages and so on. When fill crawl finishes, i see in Crawl log that all my pages have been successfully crawled and when i use some test tools to query search, my pages have been found. In crawl log there is few errors like http://mysite/sites/de/pages "The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly..", but all pages in this Page library were indexed. The problem is that i use custom managed properties (mapped to custom crawled properties) in search queries, but crawler didn't create crawled properties for all my new site columns. For example for site column IsAccent the crawler didn't create cralwed property ows_isAccesnt. I'm sure that i have created pages for specific content type and all my crawl categories have checked "Automatically discover new properties when a crawl takes place ". In site settings - Searchable columns i haven't got any column selected as Nocrowl. I tried to export my managed and crawled properties from dev environment to stage evironment but all my managed properties were empty, after that i recreated SSP...the result was the same... I checked specific page with tools like Sharepoint Manager 2007 and U2U Caml Query Builder 2007 that content type is correct, and i can see values of my custom site collumns.... Using U2U Caml Query Builder 2007 agains some Page library in Result tab i can see ows_IsAccent (my site collumn is IsAccent) and others site columns, but i can't find them in Crawled properties. Any idias?

    Read the article

  • Submitting a multidimensional array via POST with php

    - by Fireflight
    I have a php form that has a known number of columns (ex. top diameter, bottom diameter, fabric, colour, quantity), but has an unknown number of rows, as users can add rows as they need. I've discovered how to take each of the fields(columns) and place them into an array of their own. <input name="topdiameter['+current+']" type="text" id="topdiameter'+current+'" size="5" /> <input name="bottomdiameter['+current+']" type="text" id="bottomdiameter'+current+'" size="5" /> So what I end up with in the HTML is: <tr> <td><input name="topdiameter[0]" type="text" id="topdiameter0" size="5" /></td> <td><input name="bottomdiameter[0]" type="text" id="bottomdiameter0" size="5" /></td> </tr> <tr> <td><input name="topdiameter[1]" type="text" id="topdiameter0" size="5" /></td> <td><input name="bottomdiameter[1]" type="text" id="bottomdiameter0" size="5" /></td> </tr> ...and so on. What I would like to do now is take all the rows and columns put them into a multidimensional array and email the contents of that to the client (preferably in a nicely formatted table). I haven't been able to really comprehend how to combine all those inputs and selects into a nice array. At this point, I'm going to have to try to use several 1D arrays, although I have the idea that using a single 2D array would be a better practice than using several 1D arrays.

    Read the article

  • How to toggle a WPF Grid column visibility

    - by serialhobbyist
    I'm having some trouble getting this to work in a WPF app I'm working on. Basically, what I'm after is something like the Task pane in an MMC: The app has three columns in the main part of the display. I need a column on the right side which is resizable. I presume this means using a Grid with a GridSplitter but anything that works will do. I want to be able to save the width of the right-side column when the app is closed and load it when the app is opened but this should be an initial size: the user should be able to resize it. When I resize the window, I want the left- and right-side columns to stay the same size and the middle column to resize with the window width. The left- and right-side columns need to have a minimum width. When I resize the right-side column I want the centre column to get smaller but not the left-side column. I also want to be able to toggle the visibility of the right-side column with a toggle button which is outside the column and when it returns to visibility I want it to be the same width it was before. I'm trying to do as much as possible in XAML and with binding. And can I have it topped with cream, ice cream and chocolate chips, please? :-)

    Read the article

  • Don't Understand Sql Server Error

    - by Jonathan Wood
    I have a table of users (User), and need to create a new table to track which users have referred other users. So, basically, I'm creating a many-to-many relation between rows in the same table. So I'm trying to create table UserReferrals with the columns UserId and UserReferredId. I made both columns a compound primary key. And both columns are foreign keys that link to User.UserID. Since deleting a user should also delete the relationship, I set both foreign keys to cascade deletes. When the user is deleted, any related rows in UserReferrals should also delete. But this gives me the message: 'User' table saved successfully 'UserReferrals' table Unable to create relationship 'FK_UserReferrals_User'. Introducing FOREIGN KEY constraint 'FK_UserReferrals_User' on table 'UserReferrals' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. Could not create constraint. See previous errors. I don't get this error. A cascading delete only deletes the row with the foreign key, right? So how can it cause "cycling cascade paths"? Thanks for any tips.

    Read the article

  • Binding an ASP.NET GridView Control to a string array

    - by Michael Kniskern
    I am trying to bind an ASP.NET GridView control to an string array and I get the following item: A field or property with the name 'Item' was not found on the selected data source. What is correct value I should use for DataField property of the asp:BoundField column in my GridView control. Here is my source code: ASPX page <asp:GridView ID="MyGridView" runat="server" AutoGenerateColumns="false"> <Columns> <asp:BoundField DataField="Item" /> <asp:CommandField ButtonType="Link" ShowSelectButton="true" SelectText="Click Me!" /> </Columns> </asp:GridView> Code Behind: string[] MyArray = new string[1]; MyArray[0] = "My Value"; MyGridView.DataSource = MyArray; MyGridView.DataBind(); UPDATE I need to have the AutoGenerateColumns attribute set to false because I need to generate additional asp:CommandField columns. I have updated my code sample to reflect this scenarion

    Read the article

  • My SqlComand on SSIS - DataFlow OLE DB Command seems not works

    - by Angel Escobedo
    Hello Im using OLE DB Source for get rows from a dBase IV file and it works, then I split the data and perform a group by with aggregate component. So I obtain a row with two columns with "null" value : CompanyID | CompanyName | SubTotal | Tax | TotalRevenue Null Null 145487 27642.53 173129.53 this success because all rows have been grouped with out taking care about the firsts columns and just Summing the valuable columns, so I need to change that null for default values as CompanyID = "100000000" and CompanyName = "Others". I try use SqlCommand on a OLE DB Command Component : SELECT "10000000" AS RUCCLI , "Otros - Varios" AS RAZCLI FROM RGVCAFAC <property id="1505" name="SqlCommand" dataType="System.String" state="default" isArray="false" description="The SQL command to be executed." typeConverter="" UITypeEditor="Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" containsID="false" expressionType="Notify">SELECT "10000000" AS RUCCLI , "Otros - Varios" AS RAZCLI FROM RGVCAFAC</property> but nothings happens, why? and finally the task finish when the data is inserted on a SQL Server Table. Im using the same connection manager on extracting data and transform. (View Code) <DTS:Property DTS:Name="ConnectionString">Data Source=C:\CONTA\Resocen\Agosto\;Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Extended Properties=dBASE IV;</DTS:Property></DTS:ConnectionManager></DTS:ObjectData></DTS:ConnectionManager> all work is on memory, Im not using cache manager connections

    Read the article

  • Getting gridview column value as parameter for javascript function

    - by newName
    I have a gridview with certain number of columns and the ID column where I want to get the value from is currently set to visible = false. The other column is a TemplateField column (LinkButton) and as the user clicks on the button it will grab the value from the ID column and pass the value to one of my javascript function. WebForm: <script language=javascript> function openContent(contentID) { window.open('myContentPage.aspx?contentID=' + contentID , 'View Content','left=300,top=300,toolbar=no,scrollbars=yes,width=1000,height=500'); return false; } </script> <asp:GridView ID="gvCourse" runat="server" AutoGenerateColumns="False" OnRowCommand="gvCourse_RowCommand" OnRowDataBound="gvCourse_RowDataBound" BorderStyle="None" GridLines="None"> <RowStyle BorderStyle="None" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="lnkContent" runat="server" CommandName="View" CommandArgument='<%#Eval("contentID") %>' Text='<%#Eval("contentName") %>'> </asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="contentID" HeaderText="contentID" ReadOnly="True" SortExpression="contentID" Visible="False" /> <asp:BoundField DataField="ContentName" HeaderText="ContentName" ReadOnly="True" SortExpression="ContentName" Visible="False" /> </Columns> <AlternatingRowStyle BorderStyle="None" /> Code behind: protected void gvCourse_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "View") { intID = Convert.ToInt32(e.CommandArgument); } } protected void gvCourse_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ((LinkButton)e.Row.FindControl("lnkContent")).Attributes.Add("onclick", "return openContent('" + intID + "');"); } } right not i'm trying to get the intID based on user selected item so when the user clicks on the linkbutton it will open a popup window using javascript and the ID will be used as querystring.

    Read the article

  • WPF - Byte Array to Hex View (similar to Notepad++ HEX-Editor plugin)

    - by tenfour
    I am using an ItemsControl to display a List<byte> in hex. The ItemsPanelTemplate is a UniformGrid with a fixed number of columns: <ItemsControl HorizontalAlignment="Left" VerticalAlignment="Top" ItemsSource="{Binding}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="16"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding StringFormat='\{0:X2\}'}" Margin="5,5,5,0"/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> I'd like to prefix each row with an 'Address' column, just like you'd see with the Notepad++ 'HEX-Editor' plugin. That is, since I have 16 columns, each row should be prefixed something like this: 0000 [00 01 02 .... 0F] 0010 [10 11 12 .... 1F] 0020 [20 21 22 .... 2F] ... Any suggestions?

    Read the article

  • Binding DataGridComboBoxColumn to a one to many entity framework relation

    - by Cristian
    I have two tables in the model, one table contains entries related to the other table in a one to many relations, for example: Table User ID Name Table Comments ID UserID Title Text I want to show a datagrid in a WPF window with two columns, one text column with the User name and another column with a combobox showing all the comments made by the user. The datagrid definition is like this: <DataGrid AutoGenerateColumns="False" [layout options...] Name="dataGrid1" ItemsSource="{Binding}"> <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding Path=Name}"/> <DataGridComboBoxColumn Header="Comments" SelectedValueBinding="{Binding Path=UserID}" SelectedValuePath="ID" DisplayMemberPath="Title" ItemsSource="{Binding Path=Comments}" /> </DataGrid.Columns> </DataGrid> in the code I assign the DataContext like this: dataGrid1.DataContext = entities.Users; The entity User has a property named Comments that leads to all the comments made by the user. The queries are returning data and the user names are shown but the combobox is not being filled. May be the approach is totally wrong or I'm just missing a very simple point here, I'm opened to learn better methods to do this. Thanks

    Read the article

  • Updating multiple related tables in SQLite

    - by PerryJ
    Just some background, sorry so long winded. I'm using the System.Data.SQLite ADO.net adapter to create a local sqlite database and this will be the only process hitting the database, so I don't need to worry about concurrency. I'm building the database from various sources and don't want to build this all in memory using datasets or dataadapters or anything like that. I want to do this using SQL (DdCommands). I'm not very good with SQL and complete noob in sqlite. I'm basically using sqlite as a local database / save file structure. The database has a lot of related tables and the data has nothing to do with People or Regions or Districts, but to use a simple analogy, imagine: Region table with auto increment RegionID, RegionName column and various optional columns. District table with auto increment DistrictID, DistrictName, RegionId, and various optional columns Person table with auto increment PersonID, PersonName, DistrictID, and various optional columns So I get some data representing RegionName, DistrictName,PersonName, and other Person related data. The Region, District and/or Person may or may not be created at this point. Once again, not being the greatest with this, my thoughts would be something like: Check to see if Region exists and if so get the RegionID else create it and get RegionID Check to see if District exists and if so get the DistrictID else create it adding in RegionID from above and get DistrictID Check to see if Person exists and if so get the PersonID else create it adding in DistrictID from above and get PersonID Update Person with rest of data. In MS SQL Server I would create a stored procedure to handle all this. Only way I can see to do this with sqlite is a lot of commands. So I'm sure I'm not getting this. I've spent hours looking around on various sites but just don't feel like I'm going down the right road. Any suggestions would be greatly appreciated.

    Read the article

  • Select All CheckBoxes in GridView ASP.NET using JQuery

    - by dexter
    I have checkBoxes in my Gridview templete columns called "Category A" and "Category B". I want Select-All functionality, i.e. when the user checks the Select-All check Box in category A column, all the checkboxes must get checked under that column. Same for Category B. I am trying with the code below. The problem with my code is, it selects all the check boxes in the entire gridview, "Category A" as well as "Category B"s checkboxes. But, I want only checkboxes selected under the same column. function SelectAllCheckboxesA(chk) { $('#<%=gvSurveys.ClientID %>').find("input:checkbox").each(function() { if (this != chk) { if ($(this).hasClass('CatA') != false) { this.checked = chk.checked; } } else { alert($(this)); } }); } <asp:GridView ID="gvSurveys" runat="server" AutoGenerateColumns="false" AllowSorting="True" Width="1500px"> <Columns> <asp:TemplateField> <HeaderTemplate>Category A <asp:CheckBox ID="chkSelectAllCatA" runat="server" Visible="false" onclick="javascript:SelectAllCheckboxesA(this);" CssClass="SACatA" /> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="chkCatA" runat="server" Enabled="false" CssClass="CatA" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <HeaderTemplate> Category B <asp:CheckBox ID="chkSelectAllCatB" runat="server" Visible="false" CssClass="CatB" onclick="javascript:SelectAllCheckboxesB(this);" /> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="chkCatB" runat="server" Enabled="false" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>

    Read the article

  • Complex SQL query... names of returned variables

    - by Andrew P.
    Excuse me for what I'm sure is an elementary question for most of you, but I have an issue with table columns from separate tables having the same name as one another, and trying to select from both tables in the same query. Okay, so this is my code: $q_value = $mdb2->quote($_POST['query']); $field = $_POST['field']; $sql = "SELECT m.*, l.name FROM memberlist m, mail_lists l WHERE m.$field=$q_value AND l.id = m.list ORDER BY m.id"; $l_list = $mdb2->queryAll($sql, '', 'MDB2_FETCHMODE_ASSOC'); The table memberlist has the following columns: id, email, list, sex, name and the table mail_lists has the following columns: id, name After running the query, I later loop through the results with a foreach like so: foreach ($l_list as $l){ //blahblah } The problem is that the column 'name' in mail_lists refers to the names of the list, while the column 'name' in memberlist refers to the name of the member. When I later access $l-name (within the foreach), will I get m.name, or l.name? Furthermore, how do I get access to the other? Or will I just have to do two separate queries?

    Read the article

  • doublechecking: no db-wide 'unicode switch' for sql server in the foreseeable future, i.e. like Orac

    - by user72150
    Hi all, I believe I know the answer to this question, but wanted to confirm: Question Does Sql server (or will it in the foreseeable future), offer a database-wide "unicode switch" which says "store all characters in unicode (UTF-16, UCS-2, etc)", i.e. like Oracle. The Context Our application has provided "CJK" (Chinese-Japanese-Korean) support for years--using Oracle as the db store. Recently folks have been asking for the same support in sql server. We store our db schema definition in xml and generate the vendor-specific definitions (oracle, sql server) using vendor-specific xsl. We can make the change easily. The problem is for upgrades. Generated scripts would need to change the column types for 100+ columns from varchar to nvarchar, varchar(max) to nvarchar(max), etc. These changes require dropping and recreating indexes and foreign keys if the any indexes/fk's exist on the column. Non-trivial. Risky. DB-wide character encodings for us would eliminate programming changes. (I.e. we would not to change the column types from varchar to nvarchar; sql server would correctly store unicode data in varchar columns). I had thought that eventually sql server would "see the light" and allow storing unicode in varchar/clob columns. Evidently not yet. Recap So just to triple check: does mssql offer a database-wide switch for character encoding? Will it in SQL2008R3? or 2010? thanks, bill

    Read the article

  • Selecting a multi-dimensional array in LINQ

    - by mckhendry
    I have a task where I need to translate a DataTable to a two-dimensional array. That's easy enough to do by just looping over the rows and columns (see example below). private static string[,] ToArray(DataTable table) { var array = new string[table.Rows.Count,table.Columns.Count]; for (int i = 0; i < table.Rows.Count; ++i) for (int j = 0; j < table.Columns.Count; ++j) array[i, j] = table.Rows[i][j].ToString(); return array; } What I'd really like to do is use a select statement in LINQ to generate that 2D array. Unfortunately it looks like there is no way in LINQ to select a multidimensional array. Yes, I'm aware that I can use LINQ to select a jagged array, but that's not what I want. Is my assumption correct, or is there a way to use LINQ to select a multi-dimensional array?

    Read the article

  • Updating multiple related tables in SQLite with C#

    - by PerryJ
    Just some background, sorry so long winded. I'm using the System.Data.SQLite ADO.net adapter to create a local sqlite database and this will be the only process hitting the database, so I don't need to worry about concurrency. I'm building the database from various sources and don't want to build this all in memory using datasets or dataadapters or anything like that. I want to do this using SQL (DdCommands). I'm not very good with SQL and complete noob in sqlite. I'm basically using sqlite as a local database / save file structure. The database has a lot of related tables and the data has nothing to do with People or Regions or Districts, but to use a simple analogy, imagine: Region table with auto increment RegionID, RegionName column and various optional columns. District table with auto increment DistrictID, DistrictName, RegionId, and various optional columns Person table with auto increment PersonID, PersonName, DistrictID, and various optional columns So I get some data representing RegionName, DistrictName,PersonName, and other Person related data. The Region, District and/or Person may or may not be created at this point. Once again, not being the greatest with this, my thoughts would be something like: Check to see if Region exists and if so get the RegionID else create it and get RegionID Check to see if District exists and if so get the DistrictID else create it adding in RegionID from above and get DistrictID Check to see if Person exists and if so get the PersonID else create it adding in DistrictID from above and get PersonID Update Person with rest of data. In MS SQL Server I would create a stored procedure to handle all this. Only way I can see to do this with sqlite is a lot of commands. So I'm sure I'm not getting this. I've spent hours looking around on various sites but just don't feel like I'm going down the right road. Any suggestions would be greatly appreciated.

    Read the article

  • LINQ Query to DataTable.DataSource

    - by lumberjack
    I am trying to perform a LINQ query on a DataTable and show the result in another DataTable. My source DataTable looks something like this: DataTable myDataTable = new DataTable(); myDataTable.Columns.Add("OrderID", typeof(int)); myDataTable.Columns.Add("Date", typeof(DateTime)); myDataTable.Columns.Add("UnitsPurchased", typeof(int)); The resulting DataTable looks like this when filled: Order ID Date Units Purchased 16548 10/15/09 250 17984 11/03/09 512 20349 01/11/10 213 34872 01/15/10 175 My current LINQ query looks like this: IEnumerable<DataRow> query = (from row in myDataTable.AsEnumerable() where row.UnitsPurchased > 200 select new { row.OrderID, row.Date, row.UnitsPurchased }) as IEnumerable<DataRow>; resultDataTable.DataSource = query.CopyToDataTable<DataRow>(); Every time I run this code query is null. I can see that that the as IEnumerable<DataRow> is the culprit, but it makes no since to me since DataTable.AsEnumerable() returns an IEnumerable<DataRow>. Any help would be appreciated.

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >