iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
My test show WebGrid does have issue when adding new row with guid column key using BatchUpdate, However the issue is the key value of the guid is clipped so it will only get a few character of the guid not the whole guid. A bug report has been submitted to the developer.
Regarding the issue you are facing, the key is passed as '', after retrieving the dataset you will need to set some property to the datatable, such as primary key, allownull, unless you are already using strongly typed dataset to bind data to WebGrid.
In order to support multiple key field scenario you don't need to set the DataKeyField property in the WebGrid table. We already have a sample of this scenario in HierarchicalGrid.aspx. The OrderDetails has multiply key, OrderID and ProductID, so in the OrderDetails WebGrid definition no DataKeyField property is assigned
<ISWebGrid:WebGridTable Caption="Order Details" DataMember="Order Details">
On the other hand, the Order table which has the primary key OrderID will have to be assigned the DataKeyField property
<ISWebGrid:WebGridTable Caption="Orders" DataKeyField="OrderID" DataMember="Orders">
It's quite odd that it does not work in your environment. In the sample I have also provided an ASP.NET textbox and HTML input text, does this control validation works?
This issue has been reported previously by another customer and logged as bug #296. Currently the status of this bug is fixed and the fix will be release on SP1.
In order to hide the filterbar you will need to set the FilterBarVisible property to false.
Unfortunately the script require a class to be assigned to the element you wish to validate, for example class="validate[required,custom[onlyLetter],length[0,100]]"
In Intersoft control the class could not be assigned by user because Intersoft has internal mechanism that will modify the control style based on state, such as active, over, normal. In order to modify the appearance of Intersoft control you will need to modify the appropriate style.
As James suggested, there is a ways to assign class css attribute in Intersoft control. In WebCombo and WebInput case it could be done by assigning the property TextBoxStyle.Normal.CssClass
With that new revelation, the validation script does work with IntersoftWebCombo and WebInput.
Edit 8/24/09: Please us the .zip attachment to download the sample
Here are the code in your previous post
<asp:Button runat="server" Text="Change Image" OnClientClick="changeImage(); return false;" /><script type="text/javascript">function changeImage() { var grid = ISGetObject('WebGrid1'); var selectedObject = grid.GetSelectedObject(); if (selectedObject != null) { var selectedRow = selectedObject.ToRowObject(); if (selectedRow.Type == "Record") { var cells = selectedRow.GetCells(); var ncColumnPhoto = cells.GetNamedItem("ColumnPhoto"); ncColumnPhoto.SetText("images/Anne.jpg"); selectedRow.SetForceNoEdit(true); selectedRow.GetElement().style.backgroundColor = "LightCyan"; } }else { alert('Please select a row'); }}</script>
In order to update image in the column you will need to access the image HTML element and modify the src property.
The SetForceNoEdit function has worked if we already set the Grid to AllowEdit, after changeImage function is invoked the row will not be editable.
In order to change the background color of the row you will need to modify all the TD element background color of all the selected row.
Here is the updated snippet:
function changeImage() { var grid = ISGetObject('WebGrid1'); var selectedObject = grid.GetSelectedObject(); if (selectedObject != null) { var selectedRow = selectedObject.ToRowObject(); if (selectedRow.Type == "Record") { debugger; var cells = selectedRow.GetCells(); var ncColumnPhoto = cells.GetNamedItem("ColumnPhoto"); ncColumnPhoto.CellElement.getElementsByTagName('img')[0].src = "images/Anne.jpg"; selectedRow.SetForceNoEdit(true); var columnList = selectedRow.GetElement().getElementsByTagName('td'); for (var i = 1; i < columnList.length; i ) { columnList[i].style.backgroundColor = "LightCyan"; } } } else { alert('Please select a row'); }}
We do not have the code for such scenario. However the concept should be similar with BindtoCustomObject.aspx which required you to defined the select method in the ISDataSource. The select method definition, GetCustomers, could be viewed on CustomerDataAccess.cs under AppCode >> GenericObject
In order to enhance the default Slidebar you will need to add some modification to the slidebar.js, however part of the code in the js is ophuscated which will make it more difficult to enhance slidebar.js than I was previously thought. If possible, you could learn from other custom editor; such as Calculator.js, NumericUpDown.js, and HtmlEditor.js; which has no ophuscation to familiarize yourself with the Custom Editor workings and create your own version of Slidebar.
The currently available resource for CustomEditor are the article titled "Custom Editor Open Architecture" and the CustomEditorTypes.aspx sample in WebGrid sample.
An article has been provided in WebGrid documentation titled "Custom Editor Open Architecture" which will explain in detail about Custom Editor. The Sliderbar custom editor control javascript code has already been provided in WebGrid >> CustomEditors >> EditorsPack2 in the CommonLibrary folder under your default WebUI installation folder.
A sample has already been provided to show CustomEditors on WebGrid in CustomEditorTypes.aspx which is available on the installed WebGrid sample
ISDataSource has already provided a property to define the select function you could use. For this scenario, you could create a new function to select the data from both the SQL Server and Oracle Database and assign it as the select method in the ISDataSource.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname