Search Results

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

Page 84/286 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • C# how to display datetimepicker control for all rows of gridview

    - by ronny
    Hi, In my application I am creating rows and columns dynamically. I created a column of type System.DateTime. After this i want to display datetimepicker control for all rows in that column. I created a column using dataTable.Columns.Add("CreatedOn", Type.GetType("System.DateTime")); and i am adding rows as foreach(String filename ......) dataTable_FileProperty.Rows.Add(filename,//here i want to add dateTimePicker So, what is a solution for this. EDIT: Please provide some code snippet. I am new to C#.net. Thanks.

    Read the article

  • Assign binding path at runtime in WPF DataTemplate

    - by Abiel
    I am writing a WPF program in C# in which I have a ListView for which the columns will be populated at runtime. I would like to use a custom DataTemplate for the GridViewColumn objects in the ListView. In the examples I have seen where the number of columns is fixed in advance, a custom DataTemplate is often created using something like the XAML below. <DataTemplate x:Key="someKey"> <TextBlock Text="{Binding Path=FirstName}" /> </DataTemplate> This DataTemplate could also later be assigned to GridViewColumn.CellTemplate in the code-behind by calling FindResource("someKey"). However, this alone is of no use to me, because in this example the Path element is fixed to FirstName. Really I need something where I can set the Path in code. It is my impression that something along these lines may be possible if XamlReader is used, but I'm not sure how in practice I would do this. Any solutions are greatly appreciated.

    Read the article

  • Change Border in Excel left,right,bottom and top

    - by Le Viet Hung
    Firstly i changed color borders of my sheet to white, because i want to have a white sheet. Then i made some headers and want to make border around it. The Problem is it made borders between the values in header but top, down are not seenable. My code: xlWorkSheet5.Columns.Borders.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.White); // Color Sheet5 to white, BusLoad xlWorkSheet5.Columns.NumberFormat = "@"; Excel.Range rng = (Excel.Range)xlWorkSheet5.get_Range("A7","J7"); rng.RowHeight = 25.5; rng.BorderAround2(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlHairline, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic); rng.Borders.LineStyle = Excel.XlLineStyle.xlContinuous; rng.Borders.Weight = 1d; rng.Font.Bold = true; rng.HorizontalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignCenter; rng.Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.LightGray);

    Read the article

  • LaTeX beamer free-flowing two column?

    - by anon
    So in standard LaTeX, there is \twocolumn, where I can just type text, and it'll go down the left side of the page, then continue at the top of the right side of the page. Now, I know that inside of a Beamer frame, I can manually create two columns, of various width, with text in them -- however, is there a way to have the text freely flow from one column to the next? [I.e. I want to say "this text goes in these two columns; and have beamer figure out which goes into which column]. Thanks!

    Read the article

  • How can I prevent Rails from "pluralizing" a column name?

    - by Mike
    I'm using dwilkie's foreigner plugin for rails. I have a table creation statement that looks like: create_table "agents_games", :force => true, :id => false do |t| t.references :agents, :column => :agent_id, :foreign_key => true, :null => false t.references :games, :column => :game_id, :foreign_key => true, :null => false end However, this generates the following SQL: [4;35;1mSQL (2.7ms)[0m [0mCREATE TABLE "agents_games" ("agents_id" integer NOT NULL, "games_id" integer NOT NULL) [0m I want the columns to be called agent_id and game_id - not agents_id and agent_id. How can I prevent Rails from pluralizing the columns? I tried the following in my enviornment.rb file, which didn't help: ActiveSupport::Inflector.inflections do |inflect| inflect.uncountable "agent_id", "game_id" end

    Read the article

  • C# and NpgsqlDataAdapter returning a single string instead of a data table

    - by tme321
    I have a postgresql db and a C# application to access it. I'm having a strange error with values I return from a NpgsqlDataAdapter.Fill command into a DataSet. I've got this code: NpgsqlCommand n = new NpgsqlCommand(); n.Connection = connector; // a class member NpgsqlConnection DataSet ds = new DataSet(); DataTable dt = new DataTable(); // DBTablesRef are just constants declared for // the db table names and columns ArrayList cols = new ArrayList(); cols.Add(DBTablesRef.all); //all is just * ArrayList idCol = new ArrayList(); idCol.Add(DBTablesRef.revIssID); ArrayList idVal = new ArrayList(); idVal.Add(idNum); // a function parameter // Select builder and Where builder are just small // functions that return an sql statement based // on the parameters. n is passed to the where // builder because the builder uses named // parameters and sets them in the NpgsqlCommand // passed in String select = SelectBuilder(DBTablesRef.revTableName, cols) + WhereBuilder(n,idCol, idVal); n.CommandText = select; try { NpgsqlDataAdapter da = new NpgsqlDataAdapter(n); ds.Reset(); // filling DataSet with result from NpgsqlDataAdapter da.Fill(ds); // C# DataSet takes multiple tables, but only the first is used here dt = ds.Tables[0]; } catch (Exception e) { Console.WriteLine(e.ToString()); } So my problem is this: the above code works perfectly, just like I want it to. However, if instead of doing a select on all (*) if I try to name individual columns to return from the query I get the information I asked for, but rather than being split up into seperate entries in the data table I get a string in the first index of the data table that looked something like: "(0,5,false,Bob Smith,7)" And the data is correct, I would be expecting 0, then 5, then a boolean, then some text etc. But I would (obviously) prefer it to not be returned as just one big string. Anyone know why if I do a select on * I get a datatable as expected, but if I do a select on specific columns I get a data table with one entry that is the string of the values I'm asking for?

    Read the article

  • ISQL Perform instruction: after editadd editupdate of table vs. after add update of table

    - by Frank Computer
    INFORMIX-SQL 7.3 Perform Screens: According to documentation, in an "after editadd editupdate of table" control block, its instructions are executed before the row is added or updated to the table, whereas in an "after add update of table" control block, its instructions are executed after the row has been added or updated to the table, supposedly meaning that any instructions which would alter values of field-tags linked to table.columns would not be committed to the table, but field-tags linked to displayonly fields will change?.. However, when using "after add update of table" I placed instructions which alter values for field-tags linked to table.columns and their displayed and committed values also changed!.. I would have thought that an "after add update of table" would only alter displayonly fields.

    Read the article

  • Best way to compare contents of two tables in Teradata?

    - by Cade Roux
    When you need to compare two tables to see what the differences are, are there any tools or shortcuts you use, or do you handcode the SQL to compare the two tables? Background: In my SQL Server environment, I created a stored procedure which inspects the metadata of the two tables/views, creates a query (as dynamic sql) which joins the two tables on the specified key columns, and compares data in the compare columns, reporting key differences and data differences. The query can either be printed and modified/copied or just excecuted as is. We are not allowed to create stored procedures in our Teradata environment, unfortunately.

    Read the article

  • gridComplete is not working in jquery?

    - by kumar
    script type="text/javascript"> $(document).ready(function() { var RegisterGridEvents = function(excGrid) { //Register column chooser $(excGrid).jqGrid('navButtonAdd', excGrid + '_pager', { caption: "Columns", title: "Reorder Columns", onClickButton: function() { $(excGrid).jqGrid('columnChooser'); }, gridComplete: funtion(){ alert("hello"); } }); $(".ui-pg-selbox").hide(); $('.ui-jqgrid-htable th:first').prepend('Select All').attr('style', 'font-size:7px'); //Register grid resize $(excGrid).jqGrid('gridResize', { minWidth: 350, maxWidth: 1500, minHeight: 400, maxHeight: 12000 }); }; $('#specialist-tab').tabs("option", "disabled", [2, 3, 4]); $('.button').button(); RegisterButtonEvents(); RegisterGridEvents("#ExceptionsGrid") }); </script> i am not able to display hello mesage after the grid loading? thanks

    Read the article

  • One check constraint or multiple check constraints?

    - by RenderIn
    Any suggestions on whether fewer check constraints are better, or more? How should they be grouped if at all? Suppose I have 3 columns which are VARCHAR2(1 BYTE), each of which is a 'T'/'F' flag. I want to add a check constraint to each column specifying that only characters IN ('T', 'F') are allowed. Should I have 3 separate check constraints, one for each column: COL_1 IN ('T', 'F') COL_2 IN ('T', 'F') COL_3 IN ('T', 'F') Or a single check constraint: COL_1 IN ('T', 'F') AND COL_2 IN ('T', 'F') AND COL_3 IN ('T', 'F') My thoughts are it is best to keep these three separate, as the columns are logically unrelated to each other. The only case I would have a check constraint that examines more than one column is if there was some relationship between the value in one and the value in another, e.g.: (PARENT_CNT > 0 AND PRIMARY_PARENT IS NOT NULL) OR (PARENT_CNT = 0 AND PRIMARY_PARENT IS NULL)

    Read the article

  • Using LINQ to SQL with multiple databases

    - by Stuart Ferguson
    I am working on a new project and hoping to use LINQ to SQL for the data access but have come across the following issue. I need to have my application access 3 databases with similar but not the same table structure, for example Database1 and Database 2 has a table called tblCustomer with 2 columns CustomerKey and CustomerName Database2 has a table called tblCustomer with 3 columns CustomerKey, CustomerName and CustomerPostCode I am looking for a solution that will allow me a query all three databases without the need for 3 GetCustomerList functions as Database1 and Database2 could use the same function as are the same structure, with an override function for database 3 to bring back the additional field. Is there a way i can declare a base datacontext class to handle Database 1 and 2 with an inherited version for Database 3. Thanks In Advance Stuart Ferguson

    Read the article

  • Add comma-separated value of grouped rows to existing query

    - by Peter Lang
    I've got a view for reports, that looks something like this: SELECT a.id, a.value1, a.value2, b.value1, /* (+50 more such columns)*/ FROM a JOIN b ON (b.id = a.b_id) JOIN c ON (c.id = b.c_id) LEFT JOIN d ON (d.id = b.d_id) LEFT JOIN e ON (e.id = d.e_id) /* (+10 more inner/left joins) */ It joins quite a few tables and returns lots of columns, but indexes are in place and performance is fine. Now I want to add another column to the result, showing comma-separated values ordered by value from table y outer joined via intersection table x if a.value3 IS NULL, else take a.value3 To comma-separate the grouped values I use Tom Kyte's stragg, could use COLLECT later. Pseudo-code for the SELECT would look like that: SELECT xx.id, COALESCE( a.value3, stragg( xx.val ) ) value3 FROM ( SELECT x.id, y.val FROM x WHERE x.a_id = a.id JOIN y ON ( y.id = x.y_id ) ORDER BY y.val ASC ) xx GROUP BY xx.id What is the best way to do it? Any tips?

    Read the article

  • How do I set the ItemsSource of a DataGrid in XAML?

    - by Ben McCormack
    I'm trying to set the ItemsSource property of a DataGrid named dgIssueSummary to be an ObservableCollection named IssueSummaryList. Currently, everything is working when I set the ItemsSource property in my code-behind: public partial class MainPage : UserControl { private ObservableCollection<IssueSummary> IssueSummaryList = new ObservableCollection<IssueSummary> public MainPage() { InitializeComponent(); dgIssueSummary.ItemsSource = IssueSummaryList } } However, I'd rather set the ItemsSource property in XAML, but I can't get it to work. Here's the XAML code I have: <sdk:DataGrid x:Name="dgIssueSummary" AutoGenerateColumns="False" ItemsSource="{Binding IssueSummaryList}" > <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Binding="{Binding ProblemType}" Header="Problem Type"/> <sdk:DataGridTextColumn Binding="{Binding Count}" Header="Count"/> </sdk:DataGrid.Columns> </sdk:DataGrid> What do I need to do to set the ItemsSource property to be the IssueSummaryList in XAML rather than C#?

    Read the article

  • SQL Server 2000 incorrect message: duplicate key with unique index

    - by iar
    Database server: SQL Server 2000 - 8.00.760 - SP3 - Standard Edition I have a table with 5 columns, in which I want to add a large (300.000) number of records. There is a unique index on the combination of two columns. If I add the records with this unique index in place, SQL Server gives this error message: Msg 2601, Level 14, State 3, Line 1 Cannot insert duplicate key row in object 'TESTTABLE' with unique index 'test'. The statement has been terminated. (0 row(s) affected) However, if I delete the unique index and then add the records, I do not get any error when I create this unique index afterwards.

    Read the article

  • Symfony FK Constraint Issue

    - by Daniel Hertz
    Hello! So I have a table schema that has users who can be friends. User: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true } email: { type: string(255), notnull: true, unique: true } nickname: { type: string(255), unique: true } password: { type: string(300), notnull: true } image: { type: string(255) } FriendsWith: actAs: { Timestampable: ~ } columns: friend1_id: { type: integer, primary: true } friend2_id: { type: integer, primary: true } relations: User: { onDelete: CASCADE, local: friend1_id, foreign: id } User: { onDelete: CASCADE, local: friend2_id, foreign: id } It builds the database correctly, but when I try to insert test data like: User: user1: name: Danny Gurt email: [email protected] nickname: danny password: test1 user2: name: Adrian Soian email: [email protected] nickname: adrian password: test1 FriendsWith: friendship1: friend1_id: user1 friend2_id: user2 I get this integrity constraint problem: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`krowdd`.`friends_with`, CONSTRAINT `friends_with_ibfk_1` FOREIGN KEY (`friend1_id`) REFERENCES `user` (`id`) ON DELETE CASCADE) Any ideas? Thanks!

    Read the article

  • Linq Query Help Needed

    - by Randy Minder
    Say I have the following LINQ queries: var source = from workflow in sourceWorkflowList select new { SubID = workflow.SubID, ReadTime = workflow.ReadTime, ProcessID = workflow.ProcessID, LineID = workflow.LineID }; var target = from workflow in targetWorkflowList select new { SubID = workflow.SubID, ReadTime = workflow.ReadTime, ProcessID = workflow.ProcessID, LineID = workflow.LineID }; var difference = source.Except(target); sourceWorkflowList and targetWorkflowList have the exact same column definitions. But they both contain more columns of data than what is shown in the queries above. Those are just the columns needed for this particular issue. difference contains all rows in sourceWorkflowList that are not contained in targetWorkflowList Now what I would like to do is to remove all rows from sourceWorkflowList that do not exist in difference. Could someone show me a query that would do this? Thanks very much - Randy

    Read the article

  • Join query in doctrine symfony

    - by THOmas
    I have two tables userdetails and blog question The schema is UserDetails: connection: doctrine tableName: user_details columns: id: type: integer(8) fixed: false name: type: string(255) fixed: false BlogQuestion: connection: doctrine tableName: blog_question columns: question_id: type: integer(8) fixed: false unsigned: false primary: true autoincrement: true blog_id: type: integer(8) fixed: false user_id: type: integer(8) fixed: false question_title: type: string(255) I am using one join query for retrieving all the questions and user details from this two tables My join query is $q = Doctrine_Query::create() ->select('*') ->from('BlogQuestion u') ->leftJoin('u.UserDetails p'); $q->execute(); But it is showing this error Unknown relation alias UserDetails Pls anybody help me Thanks in advance

    Read the article

  • Convert Normalize table to Unormalize table

    - by M R Jafari
    I have tow tables, Table A has 3 columns as StudentID, Name, Course, ClassID and Table B has many columns as StudentID, Name, Other1, Other2, Other3 ... I want convert Table A to Table B. Please help me! Table A StudentID Name Course ClassID 85001 David Data Base 11 85001 David Data Structure 22 85002 Bob Math 33 85002 Bob Data Base 44 85002 Bob Data Structure 55 85002 Bob C# 66 85003 Sara C# 77 85003 Sara Data Base 88 85004 Mary Math 99 85005 Mary Math 100 … Table B SdentdID Name Other 1 Other 2 Other 3 Other 4 … 85001 David DBase,11 DS,22 85002 Bob Math,33 DB,44 DS,55 C#,66 85003 Sara C#,77 DBase,88 85004 Mary Math,99

    Read the article

  • NSTableView setting the sort column?

    - by overcyn
    I have a NSTableView with multiple columns. clicking each of the columns sorts by the column like in iTunes. However when the tableview first loads the rows are unsorted and no tablecolumn is highlighted or displaying the up/down indicator image. I'm wondering if theres a simple way I can programmatically set the column the table is sorted by and set the indicator image on startup. The only solution I can think of is using [NSTableView setIndicatorImage: inTableColumn:] and [NSTableView setHighlightedColumn:], but that makes it so that clicking on the header doesnt highlight the column. I would rather not have to use tableView:mouseDownInHeaderOfTableColumn: and rewrite the whole click on header to sort thing.

    Read the article

  • Join column with different collation issue

    - by George2
    Hello everyone, I am using SQL Server 2005. I have two tables, and they are using different collations. It is not allowed to concatenate columns from tables with different collations, for example the following SQL is not allowed, select table1column1 + table2column2 from ... My question is, why concatenation of two columns from different collations is not allowed from database engine design perspective? I do not know why collation will impact results, the result is just concatenating strings -- should be simple enough and not dependent on collation... thanks in advance, George

    Read the article

  • How to invoke ajax, so that it should refresh the table and update the column

    - by Radhika
    Hi, In my application,i have four columns in my datatable.Initially, except second column all the other columns displays the value. The second column values should be displayed by automatic refresh. like Initially table looks like ID type Name Color 1 Benz White 2 Maruti Grey 3 Renault orange 4 VW pink After automatic refresh(Using AJAX) it should display like ID type Name Color 1 2012 Benz White 2 2013 Maruti Grey 3 2014 Renault orange 4 2015 VW pink I have implement this in jsf using ajax. can any one help me out in this.

    Read the article

  • Need direction in creating an application which generates a crud form

    - by AlteredConcept
    Hi all, I was wondering if anyone knew of any way i can implement an application which will do the following. Allow a user to specifiy a connection string to a sql db Allow a user to specify a table in the db Allow a user to specify columns from the specified table Generate Views & a Controller with Crud methods on the fly for the specified table columns in a subdirectory on the current web app. I'm aware that there are apps that currently do this (such as sharepoints list creation stuff), but i'd like to see how this was accomplished and recreate it for my own learning purposes. Thanks alot for any help

    Read the article

  • How do I specify table data only for the current user's ID (VWD asp.net 3.5) ?

    - by Greg McNulty
    I'm using the Details View control of VWD asp.net 2008 I have a users database table and one of the columns contain the "unique" user's profile ID, created by VWD from the automatic profiles table. From my table, I would like to select only the data pertaining to the logged in user. How do I get the current unique user profileID and then have that used for the query? What I have so far: In the configure data source option of the control I select the columns I would like to display, select the check box for "Return Only Unique IDs" and the WHERE option. In this new window I select the Column to the profile userID ... "=" and then assumed I should select Source: "Profile". Now what should the parameter properties or value be to select only the logged userID specific data of the table? Any help is appreciated. Thank You!

    Read the article

  • Binding a dependency property to another dependency property

    - by Rire1979
    Take this scenario where I am working with a grid like control: <RadGrid DataContext={Binding someDataContextObject, Mode=OneWay}> <RadGrid.columns> <RadGrid.Column Header="Column Header" DataMember="{Binding dataContextObjectProperty, Mode=OneWay}"> [...] <DataTemplate> <MyCustomControl Data="{Binding ???}" /> </DataTemplate> <\RadGrid.Column> </RadGrid.columns> </RadGrid> I would like to bind the Data dependency property of MyCustomControl to the DataMember dependency property of the column to avoid multiple bindings to the same data. How do I do it?

    Read the article

  • Slow insert speed in Postgresql memory tablespace

    - by Prashant
    Hi, I have a requirement where I need to store the records at rate of 10,000 records/sec into a database (with indexing on a few fields). Number of columns in one record is 25. I am doing a batch insert of 100,000 records in one transaction block. To improve the insertion rate, I changed the tablespace from disk to RAM.With that I am able to achieve only 5,000 inserts per second. I have also done the following tuning in the postgres config: Indexes : no fsync : false logging : disabled Other information: - Tablespace : RAM - Number of columns in one row : 25 (mostly integers) - CPU : 4 core, 2.5 GHz - RAM : 48 GB I am wondering why a single insert query is taking around 0.2 msec on average when database is not writing anything on disk (as I am using RAM based tablespace). Is there something I am doing wrong? Help appreciated. Prashant

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >