I'm using jqgrid to create a grid. I have looked but can't seem to find a solution. I'm trying to add links to the column headers.
Any help appreciated.
Thanks
Hi
Trying to use FNH to map a view - FNH insists on having a Id property mapped. However not all of my views have a unique identifing column.
I can get around this with XML mappings as I can just specify a
<id type="int">
<generator class="increment"/>
</id>
at the top of the mapping.
Is there any way to duplicate this in FNH...?
TIA
Matt
I'm getting started with Fluent NHibernate, and NHibernate in general. I'm trying to do something that I feel is pretty basic, but I cant quite get it to work. I'm trying to add a new entry to a simple table.
Here's the Entity class.
public class Product
{
public Product()
{
id = 0;
}
public virtual int id {get; set;}
public virtual string description { get; set; }
}
Here's its mapping.
public class ProductMap : ClassMap<Product>
{
public ProductMap()
{
Id(p => p.id).GeneratedBy.Identity().UnsavedValue(0);
Map(p => p.description);
}
}
I've tried that with and without the additional calls after Id().
And the insert code:
var p = new Product() { description = "Apples" };
using (var s = _sf.CreateSession())
{
s.Save(new_product);
s.Flush();
}
where _sf is a properly configured SessionSource.
When I execute this code, I get: NHibernate.AssertionFailure : null identifier, which makes sense based on the SQL that NHibernate is executing: INSERT INTO "Product" (description) VALUES (@p0);@p0 = 'Apples'
It doesnt seem to be trying to set the Id field, which seems ok (on its face) since the DB should generate that. But its not, I think. The DB schema is autogenerated by FNH:
var config = Fluently.Configure().Database(MsSqlCeConfiguration.Standard.ShowSql().ConnectionString(@"Data Source=Database1.sdf"));
var SessionSource = new SessionSource(config.BuildConfiguration().Properties, new ModelMappings());
var Session = SessionSource.CreateSession();
SessionSource.BuildSchema(Session);
CreateInitialData(Session);
Session.Flush();
Session.Clear();
I'm sure to be doing tons of things wrong, but whats the one thats causing this error?
What is the Unit of Duration column in SQL Profiler? i thought it is milliseconds but in following profiler row i found it contradicting with start and end time
spid=163
duration=11310646
starttime=2010-04-06 17:45:24.480
endtime=2010-04-06 17:45:35.790
reads=152
writes=2
cpu=16
eventclass=12
textdata= DELETE FROM dbo.[Icon] WHERE Id = 20087
I have some data that I'd like to display in jqqgrid. In addition to add, edit, and delete, there are other actions that can be taken on a selected record. I like the flow of having a button/link for that action in that record's row. Is there a way to add a column & buttons/links within jqgrid which isn't bound to data?
Hi,
Anybody knows on how to wrap column names in JQGrid. Please find my JSON code below
colModel: [
{ name: 'RequestID', index: 'CreditRequest.CreditRequestID', width:100, align: 'left' },.....
With reference to the above code if the size of the content exceeds I want it to be wrapped. Any thoughts or comments
Hey there,
I have a database already set up. I am trying to change the collation to case sensitive on my username column so it restricts login parameters to what they signed up with.
However I keep getting this: #1025 - Error on rename of './yebutno_ybn/#sql-76dc_8581dc' to './yebutno_ybn/user' (errno: 150)
there is foreign key constraints due to related tables....
any ideas? this will save me a lot of hassle with the php side of things!
Thanks,
Stefan
Hi, I've just started learning WPF, and followed a book to make this sample calculator application in XAML.
The XAML code is attached below.
I don't have any UI specific code in the xaml.cs file.
However, I'm seeing a difference between design time and runtime. As you can see in the attached screenshot, the upper left button of the calculator is bigger than the rest.
Even more confusingly, the designer when I edit the XAML shows the button correctly.
I've tried to determine why is that, and I'm stumped. Can anyone help?
I'm using VS2008, targeting framework 3.5, if it's any help.
Here's the XAML:
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" FontSize="24"
Name="Header"
VerticalAlignment="Center" HorizontalAlignment="Center">Calculator</TextBlock>
<TextBox Grid.ColumnSpan="4" Grid.Column="0" Grid.Row="1" Name="Display"
HorizontalContentAlignment="Left" Margin="5" />
<Button Grid.Row="2" Grid.Column="0" Click="Button_Click">7</Button>
<Button Grid.Row="2" Grid.Column="1" Click="Button_Click">8</Button>
<Button Grid.Row="2" Grid.Column="2" Click="Button_Click">9</Button>
<Button Grid.Row="3" Grid.Column="0" Click="Button_Click">4</Button>
<Button Grid.Row="3" Grid.Column="1" Click="Button_Click">5</Button>
<Button Grid.Column="2" Grid.Row="3" Click="Button_Click">6</Button>
<Button Grid.Row="4" Grid.Column="0" Click="Button_Click">1</Button>
<Button Grid.Row="4" Grid.Column="1" Click="Button_Click">2</Button>
<Button Grid.Row="4" Grid.Column="2" Click="Button_Click">3</Button>
<Button Grid.Row="5" Grid.Column="0" Click="Button_Click">0</Button>
<Button Grid.Row="5" Grid.Column="3" Tag="{x:Static local:Operation.PLUS}"
Click="Op_Click">+</Button>
<Button Grid.Row="4" Grid.Column="3" Tag="{x:Static local:Operation.MINUS}"
Click="Op_Click">-</Button>
<Button Grid.Row="3" Grid.Column="3" Tag="{x:Static local:Operation.TIMES}"
Click="Op_Click">*</Button>
<Button Grid.Row="2" Grid.Column="3" Tag="{x:Static local:Operation.DIVIDE}"
Click="Op_Click">/</Button>
<Button Grid.Row="5" Grid.Column="1" >.</Button>
<Button Grid.Row="5" Grid.Column="2" Tag="{x:Static local:Operation.EQUALS}"
Click="Op_Click">=</Button>
</Grid>
Does anyone know if I can hack google's visualization ColumnChart api chart somehow, to make a single column stand out with a different color, like so:
I know you can do it with ImageChart, so I don't need that (it fires no events and has no x/y labels).
Can I traverse the result with javascript somehow and change the CSS style, if it is truly rendered in SVG?
Hello,
I have a DataGrid Control which is bound to a SQL Table.
The XAML Code is:
<data:DataGrid x:Name="dg_sql_data"
Grid.Row="1"
Visibility="Collapsed"
Height="auto"
Margin="0,5,5,5"
AutoGenerateColumns="false"
AlternatingRowBackground="Aqua"
Opacity="80"
>
<data:DataGrid.Columns>
<data:DataGridTextColumn Header="Latitude" Binding="{Binding lat}" />
<data:DataGridTextColumn Header="Longitude" Binding="{Binding long}" />
<data:DataGridTextColumn Header="Time" Binding="{Binding time}" />
</data:DataGrid.Columns>
</data:DataGrid>
Is it possible increase the single columns sizes to fill out the complete width of the datagrid?
thx!,
rAyt
Edit:
Columns with "*" as width are coming with the Silverlight SDK 4.
Using css only, how can I override the css of only the 2nd column of a table.
I can get to all of the columns using:
.countTable table table td
I can not get to the html on this page to modify it since it is not my site.
Thanks.
How to access crosstab formula field in another column? I have report like with Dues & total both formula fields:
Amount Dues(Done by a Formula) Total (Done by a Formula)
------ ------------------------- ---------------------------
500 20 % someAmount
Formula for Dues:
WhileReadingRecords;
numberVar due:={Command.SomeField)/100;
due
Formula for Total:
WhileReadingRecords;
numberVar total:= {Command.Amount} - due;
total
How do I access due field inside the second formula for each row of record?
I have a report in Reporting Services 2005, and I want to hide or show a single table column based upon a report parameter. Does anyone have any idea how to do that?
Thanks!
Hi,
I have two wpf datagrids having same number columns. I want to resize the same column in second grid when user resize the columns of first grid.
Thanks,
ant.
I'm using WPF Toolkit DataGrid and DataGridComboBoxColumn. Everything works well, except that when selection change happens on the combobox, the selectedvaluebinding source is not updated immediately. This happens only when the combobox loses focus. Has anyone run into this issue and any suggestions solutions ?
Here's the xaml for the column:
Hello,
I want to constrain a SQL Server decimal column to only allow -1,0,1 as valid values.
Can you show me the SQL syntax for adding such a constraint. (I would like to know how to do it in both the CREATE TABLE statement and/or the ALTER TABLE ADD CONSTRAINT).
Or can this only be accomplished in a trigger?
Seth
Hi,
I am using a insert into select from statement to insert the result set of a query into a table containing an identity column.
I am consistently getting an error
Cannot insert duplicate key row in object 'dbo.TABLE1' with unique index 'IX_TABLE1'.
Please help
I would like to get the last date of records modified. Here is a sample simple SELECT:
SELECT
t01.name,
t01.last_upd date1,
t02.last_upd date2,
t03.last_upd date3,
'maxof123' maxdate
FROM
s_org_ext t01,
s_org_ext_x t02,
s_addr_org t03
WHERE
t02.par_row_id(+)= t01.row_id and
t03.row_id(+)= t01.pr_addr_id and
t01.int_org_flg = 'n';
How can I get column maxdate to display the max of the three dates?
Note: no UNION or sub SELECT statements ;)
Is there any way to search for a particular string in a column?
I want to search like SELECT * from email_fts WHERE email_fts MATCH 'to:"[email protected]" OR from:"[email protected]"'
Thanks in advance,
Manoj
Basically, what I want to do is join 4 tables together and return 1 row for each boat.
Table Layouts
[Boats]
id, date, section, raft
[Photos]
id, boatid, pthurl, purl
[River_Company]
id, sort, company, company_short
[River_Section]
id, section
Its very simple as far as structure, however, I've having the time of my life trying to get it to return only 1 row. No boat will ever be on the same day, the only thing that's messing this up is the photo table.
If you know a better way for it to return the record table for all the boats boats and only 1 photo from the photo table, please, please post it!!
I use yui datatable and i have a field which is resumePath which is path to a file in a folder in my application... So how to use linkbutton and show my path on it...
{ key: "resumepath", label: "Resumepath", width: 250, formatter: YAHOO.widget.DataTable.formatLink }
and this doesnt work any suggestion... I want to make this file to downloaded when the user clicks on it..
I have a table "template" which is used in various "instances". All instances have checkboxes in the second column (for record-delete).
What would be the most effective way of traversing the table and check if at least one checkbox is selected (to enable a "delete" button)?
Thanks!
Maik
I have a QTreeWidgetItem with two columns of data, is there any way to make only the second column editable? When I do the following:
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setFlags(item->flags() | Qt::ItemIsEditable);
all columns become editable.
The issue about jquery flexigrid using php.
unfortunately http://flexigrid.info site is down very often
so managed to take some sample code from http://sanderkorvemaker.nl/test/flexigrid/
and worked based on that.
The above sample code works now I need to create a grid with a column with checkboxes, So that I can click a couple of those checkboxes and click delete button it should get all the id in which the checkboxes are checked to and create a delete query and execute.
Can anyone give me an example please
Thanks in advance