Sybase DataWindow .NET
Transcript of Sybase DataWindow .NET
![Page 2: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/2.jpg)
Agenda
Overview of DataWindow .NET Windows Forms Demonstration Web Forms Demonstration Q&A Session
![Page 3: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/3.jpg)
Introducing DataWindow .NET
One component for data access and reporting Greatly reduces the amount of code you need to
write in a .NET application Intuitive graphical user interface allows developers to
be productive immediately Patented technology backed up by award-winning
customer support Supports Microsoft® Windows forms, Web forms, and
Microsoft® Windows Mobile-based® Tablet PC applications
![Page 4: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/4.jpg)
DataWindow .NET
Award NominationAward Nomination
![Page 5: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/5.jpg)
What is DataWindow .NET?
DataWindow .NET consists of: A Component that plugs into your .NET development
environment A DataWindow Designer that allows you to graphically
create your data presentation layer A Database Administration Tool to access and graphically
display database information Database drivers to access your RDBMS of choice
![Page 6: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/6.jpg)
What is DataWindow .NET?
At runtime DataWindow .NET consists of: Data entry interfaces Reports Engine that tracks user modifications and dynamically
generates INSERTs, UPDATEs and DELETEs
…all from one tool.
![Page 7: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/7.jpg)
Database Support
![Page 8: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/8.jpg)
Introducing DataWindow .NET
Presentation Styles
![Page 9: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/9.jpg)
Presentation Styles
![Page 10: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/10.jpg)
Report Styles
![Page 11: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/11.jpg)
Freeform Style DataWindow
![Page 12: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/12.jpg)
Tabular Style DataWindow
![Page 13: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/13.jpg)
Grid Style DataWindow
![Page 14: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/14.jpg)
Graph Style DataWindow
![Page 15: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/15.jpg)
Label Style DataWindow
![Page 16: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/16.jpg)
N-Up Style DataWindow
![Page 17: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/17.jpg)
Group Report Style DataWindow
![Page 18: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/18.jpg)
Nested Report Style DataWindow
![Page 19: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/19.jpg)
Composite Report Style DataWindow
![Page 20: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/20.jpg)
Cross Tab Style DataWindow
![Page 21: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/21.jpg)
Introducing DataWindow .NET
Additional Features
![Page 22: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/22.jpg)
Drop Down DataWindows
Think of them as enhanced Combo BoxesThink of them as enhanced Combo Boxes
![Page 23: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/23.jpg)
DataWindow Validation Rules
Validation rule files
![Page 24: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/24.jpg)
Over 1000 properties that can be accessed and manipulated at both design time and runtime
Approximately 200 methods to access and control data and the DataWindow
Lots of events for even greater control ItemChanged, ItemError, SQLPreview,
RowFocusChanged, etc.
DataWindow .NETMore Information
![Page 25: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/25.jpg)
DataWindow .NETMore Information
Edit Masks and formatting Computed Fields for client-side processing Supports SQL, stored procedures and external data
sources Easy printing of DataWindows ( dwc.Print() ) Dynamic creation of DataWindows at runtime And much more!
![Page 26: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/26.jpg)
Reduce CodeExample: Setting the Autosize Height on a Row
public void AutoSizeGrid() { // DataGrid should be bound to a DataTable for this part to // work. int numRows = ((DataTable)gridTasks.DataSource).Rows.Count; Graphics g = Graphics.FromHwnd(gridTasks.Handle); StringFormat sf = new StringFormat(StringFormat.GenericTypographic); SizeF size;
// Since DataGridRows[] is not exposed directly by the DataGrid // we use reflection to hack internally to it.. There is actually // a method get_DataGridRows that returns the collection of rows // that is what we are doing here, and casting it to a System.Array MethodInfo mi = gridTasks.GetType().GetMethod("get_DataGridRows", BindingFlags.FlattenHierarchy | BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
System.Array dgra = (System.Array)mi.Invoke(gridTasks,null);
// Convert this to an ArrayList, little bit easier to deal with // that way, plus we can strip out the newrow row. ArrayList DataGridRows = new ArrayList(); foreach (object dgrr in dgra) { if (dgrr.ToString().EndsWith("DataGridRelationshipRow")==true) DataGridRows.Add(dgrr); }
// Now loop through all the rows in the grid for (int i = 0; i < numRows; ++i) { // Here we are telling it that the column width is set to // 400.. so size will contain the Height it needs to be. size = g.MeasureString(gridTasks[i,1].ToString(),gridTasks.Font,400,sf); int h = Convert.ToInt32(size.Height); // Little extra cellpadding space h = h + 8;
// Now we pick that row out of the DataGridRows[] Array // that we have and set its Height property to what we // think it should be. PropertyInfo pi = DataGridRows[i].GetType().GetProperty("Height"); pi.SetValue(DataGridRows[i],h,null);
// I have read here that after you set the Height in this manner that you should // Call the DataGrid Invalidate() method, but I haven't seen any prob with not calling it..
}
g.Dispose(); }
DataGridDataGrid
DataWindoDataWindoww
![Page 27: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/27.jpg)
Reduce CodeExample: Setting a Column Style to Checkbox
// code assumes you have a DataSet named myDataSet, a table named "EastCoastSales" and a DataGrid myDataGrid //STEP 1: Create a DataTable style object and set properties if required. DataGridTableStyle ts1 = new DataGridTableStyle();
//specify the table from dataset (required step) ts1.MappingName = "EastCoastSales"; // Set other properties (optional step) ts1.AlternatingBackColor = Color.LightBlue;
//STEP 2: Create a string column and add it to the tablestyle DataGridColumnStyle TextCol = new DataGridTextBoxColumn(); TextCol.MappingName = "custName"; //from dataset table TextCol.HeaderText = "Customer Name"; TextCol.Width = 250; ts1.GridColumnStyles.Add(TextCol);
//STEP 3: Create an int column style and add it to the tablestyle //this requires setting the format for the column through its property descriptor PropertyDescriptorCollection pdc = this.BindingContext [myDataSet, "EastCoastSales"].GetItemProperties();
//now created a formated column using the pdc DataGridDigitsTextBoxColumn csIDInt = new DataGridDigitsTextBoxColumn(pdc["CustID"], "i", true); csIDInt.MappingName = "CustID"; csIDInt.HeaderText = "CustID"; csIDInt.Width = 100; ts1.GridColumnStyles.Add(csIDInt);
//STEP 4: Add the checkbox DataGridColumnStyle boolCol = new DataGridBoolColumn(); boolCol.MappingName = "Current"; boolCol.HeaderText = "Info Current";
//uncomment this line to get a two-state checkbox //((DataGridBoolColumn)boolCol).AllowNull = false;
boolCol.Width = 150; ts1.GridColumnStyles.Add(boolCol);
//STEP 5: Add the tablestyle to your datagrid's tablestlye collection myDataGrid.TableStyles.Add(ts1);
DataGridDataGrid
DataWindowDataWindow
![Page 28: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/28.jpg)
Reduce CodeExample: Adding a Combo Box
// Step 1. Derive a custom column style from DataGridTextBoxColumn // a) add a ComboBox member // b) track when the combobox has focus in Enter and Leave events // c) override Edit to allow the ComboBox to replace the TextBox // d) override Commit to save the changed data
// Step 2 - Use the combo column style // Add 1 col with combo style DataGridComboBoxColumn ComboTextCol = new DataGridComboBoxColumn(); ComboTextCol.MappingName = "custCity"; ComboTextCol.HeaderText = "Customer Address"; ComboTextCol.Width = 100; ts1.GridColumnStyles.Add(ComboTextCol);
// Step 3 - Additional setup for Combo style // a) make the row height a little larger to handle minimum combo height ts1.PreferredRowHeight = ComboTextCol.ColumnComboBox.Height + 3; // b) Populate the combobox somehow. It is a normal combobox, so whatever... ComboTextCol.ColumnComboBox.Items.Clear(); ComboTextCol.ColumnComboBox.Items.Add("Chicago"); ComboTextCol.ColumnComboBox.Items.Add("Corvallis"); ComboTextCol.ColumnComboBox.Items.Add("Denver"); ComboTextCol.ColumnComboBox.Items.Add("Great Falls"); ComboTextCol.ColumnComboBox.Items.Add("Kansas City"); ComboTextCol.ColumnComboBox.Items.Add("Los Angeles"); ComboTextCol.ColumnComboBox.Items.Add("Raleigh"); ComboTextCol.ColumnComboBox.Items.Add("Washington");
// c) set the dropdown style of the combo... ComboTextCol.ColumnComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
DataGridDataGrid DataWindowDataWindow
Note: For data from a database even more code would be required!Note: For data from a database even more code would be required!
![Page 29: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/29.jpg)
Demonstration OneWindows Forms
![Page 30: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/30.jpg)
Demonstration TwoWeb Forms
![Page 31: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/31.jpg)
What’s Possibledw-eXtreme.com
![Page 32: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/32.jpg)
What’s Possibledw-eXtreme.com
![Page 33: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/33.jpg)
What’s Possibledw-eXtreme.com
![Page 34: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/34.jpg)
What’s Possibledw-eXtreme.com
![Page 35: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/35.jpg)
What’s Possibledw-eXtreme.com
![Page 36: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/36.jpg)
What’s Possibledw-eXtreme.com
![Page 37: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/37.jpg)
What’s Possibledw-eXtreme.com
![Page 38: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/38.jpg)
What’s Possibledw-eXtreme.com
![Page 39: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/39.jpg)
What’s Possibledw-eXtreme.com
![Page 40: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/40.jpg)
What’s Possibledw-eXtreme.com
![Page 41: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/41.jpg)
Demonstration Fourdw-eXtreme.com “Planner”
![Page 42: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/42.jpg)
Session Summary
Provided an overview of DataWindow .NET features
Demonstrated how DataWindow .NET can be used in .NET Windows Forms applications
Demonstrated how DataWindow .NET can be used in ASP.NET applications
![Page 43: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/43.jpg)
Roadmap for DataWindow .NET
DataWindow .NET 1.5 WebForms and ASP .NET Direct access to DataWindow object properties using the
DataWindow .NET object model Ink Edit and Ink Picture Controls General availability April 8, 2005
DataWindow .NET 2.0 Support for .NET Datasets and DataTables Additional ADO .NET support Integrate DataWindow Designer into the Microsoft® Visual Studio® IDE Support for Microsoft® .NET Framework 2.0 and ASP .NET 2.0 Release planned for late 2005
![Page 44: Sybase DataWindow .NET](https://reader033.fdocuments.in/reader033/viewer/2022061210/5490c4cab4795969178b4f00/html5/thumbnails/44.jpg)
DataWindow .NETResources
Newsgroup: Forums.sybase.com – sybase.public.datawindow.net http://www.sybase.com/support/newsgroups
Blogs: http://www.teamsybase.net/blogs
Code Examples: http://datawindownet.codexchange.sybase.com
Product Information and Evaluation Copy: http://www.sybase.com/datawindow.net
Replay of MSDN live webcast: http://www.microsoft.com/events/webcasts/library/200503.mspx
DataWindow .NET 1.5 Evaluation Download http://response.sybase.com/forms/dwnet15eval