Search Results

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

Page 129/286 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • ExtJS: Adding table inside a dynamically added tab

    - by esskar
    Hi, i'm fairly new to ExtJS. I adopted some examples and added the functionality to add tabs to a tab-control by clicking on some link. so far so good. now i want to load a ExtJS table into on of the new tabs. the items (rows, columns) are defined in a database on the server side. can you give me some hints how to add the table automatically when the tab is created?

    Read the article

  • Fluent NHibernate - How to map a non nullable foreign key that exists in two joined tables

    - by vakman
    I'm mapping a set of membership classes for my application using Fluent NHibernate. I'm mapping the classes to the asp.net membership database structure. The database schema relevant to the problem looks like this: ASPNET_USERS UserId PK ApplicationId FK NOT NULL other user columns ... ASPNET_MEMBERSHIP UserId PK,FK ApplicationID FK NOT NULL other membership columns... There is a one to one relationship between these two tables. I'm attempting to join the two tables together and map data from both tables to a single 'User' entity which looks like this: public class User { public virtual Guid Id { get; set; } public virtual Guid ApplicationId { get; set; } // other properties to be mapped from aspnetuser/membership tables ... My mapping file is as follows: public class UserMap : ClassMap<User> { public UserMap() { Table("aspnet_Users"); Id(user => user.Id).Column("UserId").GeneratedBy.GuidComb(); Map(user => user.ApplicationId); // other user mappings Join("aspnet_Membership", join => { join.KeyColumn("UserId"); join.Map(user => user.ApplicationId); // Map other things from membership to 'User' class } } } If I try to run with the code above I get a FluentConfiguration exception Tried to add property 'ApplicationId' when already added. If I remove the line "Map(user = user.ApplicationId);" or change it to "Map(user = user.ApplicationId).Not.Update().Not.Insert();" then the application runs but I get the following exception when trying to insert a new user: Cannot insert the value NULL into column 'ApplicationId', table 'ASPNETUsers_Dev.dbo.aspnet_Users'; column does not allow nulls. INSERT fails. The statement has been terminated. And if I leave the .Map(user = user.ApplicationId) as it originally was and make either of those changes to the join.Map(user = user.ApplicationId) then I get the same exception above except of course the exception is related to an insert into the aspnet_Membership table So... how do I do this kind of mapping assuming I can't change my database schema?

    Read the article

  • Linq to sql, summing timespan?

    - by DaRKoN_
    I have a time field in a mssql 2008 database that I want to do something to the effect of: Timespent = x.sum(x => x.AmountOfTime); Where AmountOfTime is a time MSSQL field. Sum seems to only work on decimals, how can I add these columns?

    Read the article

  • ASP.NET MVC 2 generation of the List/Index view

    - by Klas Mellbourn
    ASP.NET MVC 2 has powerful features for generating the model-dependent content of the Edit view (using EditorForModel) and Details view (using DisplayForModel) that automatically utilizes metadata and editor (or display) templates: <% using (Html.BeginForm()) {%> <%= Html.ValidationSummary(true) %> <fieldset> <legend><%= Html.LabelForModel() %></legend> <%= Html.EditorForModel() %> <p> <input type="submit" value="Save" /> </p> </fieldset> <% } %> However, I cannot find any comparable tools for the "last" step of generating the Index view (a.k.a. the List view). There I have to hard code the columns first in the row representing the headers and then inside the foreach loop: <h2>Index</h2> <table> <tr> <th></th> <th> ID </th> <th> Foo </th> <th> Bar </th> </tr> <% foreach (var item in Model) { %> <tr> <td> <%= Html.ActionLink("Edit", "Edit", new { id=item.ID }) %> | <%= Html.ActionLink("Details", "Details", new { id=item.ID })%> | <%= Html.ActionLink("Delete", "Delete", new { id=item.ID })%> </td> <td> <%= Html.Encode(item.ID) %> </td> <td> <%= Html.Encode(item.Foo) %> </td> <td> <%= Html.Encode(String.Format("{0:g}", item.Bar)) %> </td> </tr> <% } %> </table> What would be the best way to generate the columns (utlizing metadata such as HiddenInput), with the aim of making the Index view as free of model particulars as Edit and Details?

    Read the article

  • Flex DataGrid mouseover row with gradient background

    - by asawilliams
    I have a DataGrid that needs to show a gradient background on mouseover of the row. I have created itemrenderers for each of the columns and the gradient shows up for the individual cell that is moused over, but not for the whole row. How do I get the whole row to show the gradient when mousing over one of the cells?

    Read the article

  • C# datagrid click position

    - by user1112111
    Hi, Does anybody know how can I determine where the user clicked in a DataGrid control ? I'm using .NET CF with Windows Mobile 6. What I need to know is whether the user clicked on the selected cell or on an empty area (not covered by columns or rows). Is there a way to retrieve it from EventArgs ? Thanks.

    Read the article

  • android : listview customization

    - by Puneet kaur
    hi, it is possible to have single listview with 2 or more columns ,which is operatable with paging property (i.e. at a time listview will show only 4 items in single column and on press of right arrow it will show next 4 items ).. can u please tell me he procedure to implement it or any idea. Thanks puneet

    Read the article

  • Many-to-many relations in RDBMS databases

    - by Industrial
    What is the best way of handling many-to-many relations in a RDBMS database like mySQL? Have tried using a pivot table to keep track of the relationships, but it leads to either one of the following: Normalization gets left behind Columns that is empty or null What approach have you taken in order to support many-to-many relationships?

    Read the article

  • Filter Calendar view SharePoint WWS 3.0

    - by lerac
    Hi all, I have a SP site with a calendarview and would like to filter this on the basis of the current user. Don't be afraid I already figured out how do to this with a list customizing some excisting jScripts and working with Content Editor WebPart. Yet this jScript does not work in a Calendar. To paint a picture I have columns like: Judge1 Lawyer Clerk (example). Underneath these columns there are names ofcourse. However these are not shown in Calendar view, so it is hard to filter on something that is not displayed only the casenumbers. Now I've been thinking (not always wise) perhaps I can adjust the aspx page of calendar/list by adjusting a filter I applied in SharePoint. This would also solve the issue of displaying all the content before it filters with Java, since it should not be possible for users to see the entire listcontent (security). I went to Modify list view and created a filter where judge1 = Mr. J. Jenkins. Then I went to SharePoint Designer and opend the Calendar aspx page. To my expectation I found Mr. J. Jenkins with the following code: Since I can't display image because i'm new, not very handy discrimination I have to give you a url. Code can't be pasted either is completely messes it up even with codemode on. Hyperlink CODE IMAGE Keep in mind I just posted a very tiny part of the code (only the part I want to change). Now I have no idea what kind of code this is above this text (SP wss 3.0 uses for aspx pages), but I would like to change Mr. J. Jenkins into a jScript var/val. Since I already managed to get the current user that is logged in content. var user = jP.getUserProfile(); var userinfspvalue = user.Department; There is more code around that one 2 ofcourse, yet to give you a picture. The var userinfspvalue is what I would like to replace the text Mr. J. Jenkins into. This would mean the calendar would be dynamically filtered based upon the current user that is logged on. Have no idea what is possible, perhaps there is a better solution who knows... Do you know? Thank you so much ahead!

    Read the article

  • Google Spreadsheet multiple column filter using OR

    - by thefroatgt
    I have a Google Spreadsheet with 3 columns which are either blank or have a value. I want to get the count of the number of rows that has A and either B or C populated. If I were writing a SQL query it would be select count(*) from Table where A is not null and (B is not null or C is not null) But I can't for the life of me figure out how to get this in a Google Spreadsheet

    Read the article

  • What text editors support vertical rulers?

    - by leeand00
    I'm looking for a feature somewhat like the vertical red 80 columns marker in NetBeans but one that's easier to use. I'd like it to function more like the tabs in MS Word except that the horizontal line is displayed on the entire file. I looked on the Comparison of Text Editors over at Wikipedia and I didn't find that "vertical ruler" was one of their features. It would be used to line up html tags in a massive file that I did not create, but have to maintain.

    Read the article

  • Visual Studio: What happened to the "Break when an exception is unhandled" option?

    - by Adrian Grigore
    Hi, As far as I remember, Visual Studio (both 2008 and 2010) used to have an option to break either on thrown exceptions or on unhandled exceptions. Now when I bring up the Exceptions dialog (Ctr+Alt+E), it just offers to break when an exception is thrown: http://screencast.com/t/NDk3NDYxZD I've tried resizing to the columns in that dialog, but that did not help. Is this a bug, or am I missing something?

    Read the article

  • C# - How to edit a selected SubItem programmatically?

    - by Dodi300
    Hello. Does anyone know how can I edit a subitem on a listView? I've tried using this: ListView1.SelectedItems[0].SubItems[1].Text = "Hello?"; But that doesn't work. I get the error "InvalidArgument=Value of '1' is not valid for 'index'". I've got two columns on the listview, so I figured the index of [1] would be the subitem. Thanks for the help!

    Read the article

  • Mysql: how to extract multiple text files from my mysql table

    - by Patrick
    hi, I need to extract data from my mysql database into multiple text files. I have a table with 4 columns: UserID, UserName, Tag, Score. I need to create a text file for each Tag, with the userID, the userName and score (ordered by score) i.e. Tag1.txt 234922 John 35 234294 David 205 392423 Patrick 21 Tag2.txt 234922 John 35 234294 David 205 392423 Patrick 21 and so on... Edited: Sample: http://dl.dropbox.com/u/72686/expertsTable.png thanks

    Read the article

  • For a .NET winforms datagridview I would like a combobox column to have a different set of values for each row.

    - by Seth Spearman
    Hello, I have a DataGridView that I am binding to a POCO. I have the databinding working fine. However, I have added a combobox column that I want to be different for each row. Specifically, I have a grid of purchased items, some of which have sizes (like Adult XL, Adult L) and other items are not sized (like Car Magnet.) So essentially what I want to change is the DATA SOURCE for a combobox column in the data grid. Can that be done? What event can I hook into that would allow me to change properties of certain columns FOR EACH ROW? An acceptable alternative is to change a property when the user clicks or tabs into the row. What event is that? Seth EDIT I need more help with this question. With Triduses help I am SO close but I need a bit more information. First, per the question, is the CellFormatting event really the best/only event for changing the DataSource for a combo box column. I ask because I am doing something rather resource/data intensive, not merely formatting the cell. Second, the cellformatting event is being called just by having the mouse hover over the cell. I tried to set the FormattingApplied property inside my if-block and then I check for it in the if- test but that is returning a weird error message. My ideal situation is that I would apply change the data source for the combo box once for each row and then be done with it. Finally, in order to set the data source of the combobox colunm I have to be able to cast the Cell inside my if block to a type of DataGridViewComboBoxColumn so that I can fill it with rows or set the datasource or something. Here is the code I have right now. Private Sub ProductsDataGrid_CellFormatting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles ProductsDataGrid.CellFormatting If e.ColumnIndex = ProductsDataGrid.Columns("SizeDGColumn").Index Then ' AndAlso Not e.FormattingApplied Then Dim product As LeagueOrderProductInfo = DirectCast(ProductsDataGrid.Rows(e.RowIndex).DataBoundItem, LeagueOrderProductInfo) Dim sizes As LeagueOrderProductSizeList = product.ProductSizes sizes.RemoveSizeFromList(_parentOrderDetail.SizeID) 'WHAT DO I DO HERE TO FILL THE COMBOBOX COLUMN WITH THE sizes collection. End If End Sub Please help. I am completely stuck and this task item should have taken an hour and I am 4+ hours in now. BTW, I am also open to resolving this by taking a completely different direction with it (as long as I can be done quickly.) Seth

    Read the article

  • System.Web.HttpException on asp:gridview pagination

    - by Carlos Muñoz
    I have the following <asp:gridview> with one one TemplateField. En each cell there is an image with a link and a text with a link. It has AllowPaging=True This is the gridview: <asp:GridView ID="gvExperiencias" runat="server" AllowPaging="True" GridLines="None" ShowHeader="False" AutoGenerateColumns="False" Width="650px" PageSize="4" OnDataBinding="gvExperiencias_DataBinding" OnPageIndexChanging="gvExperiencias_PageIndexChanging"> <PagerSettings Mode="NumericFirstLast" FirstPageImageUrl="~/images/fle_pag_izq.gif" LastPageImageUrl="~/images/fle_pag_der.gif" NextPageImageUrl="~/images/fle_pag_der.gif" PreviousPageImageUrl="~/images/fle_pag_izq.gif" Position="TopAndBottom" PageButtonCount="4" FirstPageText="" LastPageText="" NextPageText="" PreviousPageText=""></PagerSettings> <Columns> <asp:TemplateField> <ItemTemplate> <div id="it_0" class="new_solo_exp_ini"> <asp:HyperLink ID="a_0" runat="server" NavigateUrl='<%# "experiencia.aspx?cod_cod=" + Eval("tttb_articulo_relacion_0.ARTCOD_ARTREL") + "&pag=" + pag + "&grp=" + Eval("idiocod_cod_idi_0") + "&cod="+cod %>' Visible='<%# Eval("NotEmpty_0") %>'> <asp:Image ID="Image_0" runat="server" Height="88px" ImageUrl='<%# Eval("arigls_nom_img_0","~/ArchivosUsuario/1/1/Articulos/{0}") %>' Width="88px" CssClass="new_image_exp_ini" /> </asp:HyperLink> <div class="new_vineta_tit_exp_ini"> <asp:HyperLink ID="HyperLink_0" runat="server" NavigateUrl='<%# "experiencia.aspx?cod_cod=" + Eval("tttb_articulo_relacion_0.ARTCOD_ARTREL") + "&pag=" + pag + "&grp=" + Eval("idiocod_cod_idi_0") + "&cod="+cod %>' Text='<%# Bind("arigls_tit_0") %>'> </asp:HyperLink> </div> </div> </ItemTemplate> </asp:TemplateField> </Columns> <PagerStyle CssClass="new_pag_bajo_exp_ini" /> <RowStyle CssClass="new_fila_exp_ini" /> </asp:GridView> When I click the last button or the ... it goes to the corresponding page but when i click on a previous page i get the following errror: An Error Has Occurred Because A Control With Id $ContentPlaceHolder1$gvExperiencias$ctl01$ctl01' Could Not Be Located Or A Different Control Is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error. So the pager does not work correctly. I think it's because of the Image's Id that has to be generated dinamically but i don't know how to do it. Can someone help me?

    Read the article

  • Delphi - ListView Question

    - by Brad
    Is there a ListView (ListBox) or similar component that allows me to easily drop another component in a specific column. (Multiple columns)? Like a checkbox, button or drop down list or all the above. (It would be nice to be able to sort via the header also) If not does anyone know of a resource on how to custom draw something like this? Thanks -Brad

    Read the article

  • LINQ to SQL select distinct from multiple colums

    - by Morron
    Hi, I'm using LINQ to SQL to select some columns from one table. I want to get rid of the duplicate result also. Dim customer = (From cus In db.Customers Select cus.CustomerId, cus.CustomerName).Distinct Result: 1 David 2 James 1 David 3 Smith 2 James 5 Joe Wanted result: 1 David 2 James 3 Smith 5 Joe Can anyone show me how to get the wanted result? Thanks.

    Read the article

  • POI performance

    - by The Machine
    I am using POI in my J2EE web application to generate a workbook. However, i find that POI takes around 3 mins to create a workbook with 25K rows(with around 15 columns each). Is this a POI performance issue , or is it justified to take that much of time? Are there other APIs known for better performance ?

    Read the article

  • Designing a game database

    - by Ronald
    I'm trying to design a database to record game histories for a game I'm working on. I have 3 different tables: users, gamehistories, and gamescores. Columns for tables: users: uid, displayname, email gamehistories: gid, pubID, start (datetime), end (datetime) gamescores: gid, uid, score I am trying to produce the following result set given a userID (uid): Opponent's displayname, my score, opponent's score, duration Any ideas? Is my design ok? How can I query these tables to get game histories for a given uid?

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >