is this supported? or do i have to create a third PK in the app only?
tia.
1. DataTable.PrimaryKey is a unique property of the datatable (i.e. there is only one primary key, and that's all. The same concept is used in the databases BTW).
2. May be you meant UniqueConstraint http://msdn2.microsoft.com/en-us/library/system.data.uniqueconstraint.aspx ?
3. This are ADO.NET things. What does this have to do with Infragistics components?
I am binding a webgrid to a sharepoint datatable and allowing the user to update a document list via the webgrid.
Let us consider the following example code:
tbl = ds.Tables.Add("Order Details");tbl.Columns.Add("OrderID", typeof(int));tbl.Columns.Add("ProductID", typeof(int));tbl.PrimaryKey = new DataColumn[ {tbl.Columns["OrderID"], tbl.Columns["ProductID"]};
... is this supported in the ultrawebgrid?
I have reviewed source samples eg. UltraWebGrid1.Bands[0].DataKeyField=dataSet11.Tables[ParentTable].PrimaryKey[0].ColumnName;
this example does not provide for multiple keys .. any thoughts?
In NetAdvantage 2009 Volumn 1, this doesn't workIf I use this format, those AddRow, UpdateRow, DeleteRow events won't fire.
Could anyone provide a workable solution? All of my grids build upon 2008 vol 3 are failed...
The DataKeyField off the Band takes a string of column names, comma delimited.
.DataKeyField = "OrderID, ProductID";
I found the anwer ...
.DisplayLayout.Bands(0).DataKeyField = "OrderId, ProductID"
would produce the desired two column key relationship in the webgrid.
Dim key_row() As Object = e.Cell.Row.DataKey table = dsList.Tables(e.Cell.Band.BaseTableName) row = table.Rows.Find(key_row)
table = dsList.Tables(e.Cell.Band.BaseTableName)
row = table.Rows.Find(key_row)
would allow you to find the key.