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
In a WebGrid BatchUpdate scenario, the AddRow server side event will not be raised. All update, delete, and insert will need to be handled on the BatchUpdate server side event.
More detail regarding the BatchUpdate could be read on the WebGrid 7 Whitepaper in the section "Updating to Physical Database"
Care to elaborate why it does not work in your scenario? does the application returns error or the image does not show but there is no error?
Could you also give us some more information regarding the event you wish to bind the image?
In your code, you are using UpdateUI function which is asynchronous and trying to set the combo to the newly added item. Since UpdateUI function is asynchronous, it will take some time to update the UI to relfect the changes. You will need to set some timeout to wait for the WebCombo to refresh. Here is the modified snippet:
var currentItemResourceCount;function wbSave_OnClick() { var wr = ISGetObject("wcResources"); //create and add a new resource if one is not selected (an existing event) if (wr.Value == "") { currentItemResourceCount = wr.Rows.length; ISGetObject("wiResourceName").SetValueData("New Resource1"); ISGetObject("wcResourcesColor").SetSelectedIndex(0); ISGetObject("wiRLocation").SetValueData("N/A"); ISGetObject("wiRDescription").SetValueData("New Resource1"); WS_OnSaveResource(); //Now select the new row wr.UpdateUI(); SetLatestResource(); } //Now call original function and return WS_OnSave(); return true; } function SetLatestResource() { var wr = ISGetObject("wcResources"); if (wr.Rows[currentItemResourceCount] != null) { ISGetObject("wcResources").Rows[wr.Rows.length - 1].Select(); } else { setTimeout(function() { SetLatestResource(); }, 10); } }
You will need to set the property in the client side to disable editing and deleting completely. In order to achieve that, you will need to invoke JS function in InitializeLayout server side event. Here is the updated code snippet. For InitializeLayout server side event:
protected void _webGrid_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e){ short fiscalYear = short.Parse(_fiscalYearList.SelectedValue); if (fiscalYear == 2009) { e.Layout.AllowAddNew = AddNew.Yes; e.Layout.AllowEdit = Edit.Yes; e.Layout.AllowDelete = Delete.Yes; _webGrid.ClientAction.InvokeScript("setWebGridAccess('write')"); } else { e.Layout.AllowAddNew = AddNew.No; e.Layout.AllowEdit = Edit.No; e.Layout.AllowDelete = Delete.No; _webGrid.ClientAction.InvokeScript("setWebGridAccess('read')"); }}
Added JS function:
function setWebGridAccess(type) { var wg = ISGetObject('_webGrid'); if (type == "read") { wg.RootTable.AllowEdit = "no"; wg.RootTable.AllowDelete = "no"; wg.RootTable.AllowAddNew = "no"; } else { wg.RootTable.AllowEdit = "yes"; wg.RootTable.AllowDelete = "yes"; wg.RootTable.AllowAddNew = "yes"; }}
David workaround works, however for the initial load you will need to set the ViewSettings SelectedDate time to the hour you wish to show first, for example:
ws.ViewSettings.SelectedDate.setHours(8);
So the new snippet, based on David's code, will be:
function WebScheduler1_OnAfterRenderView(controlId, viewMode) { if (viewMode == "Day" || viewMode == "Week") { var ws = ISGetObject("WebScheduler1"); ws.ViewSettings.SelectedDate.setHours(8); var frm = ws.GetSchedulerTableFrame(); var row = frm.rows[2].children[0].children[0].children[0].rows[17]; row.scrollIntoView(); }}
WebScheduler V3 will be released in WebUI Studio 2009 R2 which is scheduled to be released in November 2009.
Regarding the "Custom" SelectedViewMode, the option is a reserved keyword for future usage. Currently the option has no function / implementation in the WebScheduler.
Regarding the workaround, we will try to analyse if it is possible
WebCoverFlowItem ImageSource property will accept BitmapImage object. Here is a snippet of WebCoverFlow creation using WebCoverFlowItem and ImageSource
String[] imgList = new String[]{"binfolder.jpg", "cal_ie.jpg", "designer_screenshot.jpg", "FF3_1_SchedulerMarch2009.png", "FFRoundedCombo.jpg", "firebug.jpg", "LIC-1.jpg", "SchedulerWeekView.png", "WebTreeViewAbout.jpg"}; foreach (String imgFile in imgList) { WebCoverFlowItem test1 = new WebCoverFlowItem(); test1.ImageSource = new BitmapImage(new Uri("images/" + imgFile, UriKind.Relative)); test1.ItemName = "Item" + index.ToString(); test1.Title = "Image #" + index.ToString() + " Title"; CoverFlow1.Items.Add(test1); index++; }
Since you could not enter the TDN, I will attached the latest WebCombo and WebUI Framework.
Attached is the new sample of WebCombo using Linq DataSource control, I also encounter no issue using such configuration.
We just release a new hotfix, perhaps you could try updating your WebCombo and WebUI Framework to see if it is working with the lateset build.
Edited: 26 Oct 2009
Further analysisin the sample HyperFastWebComboWithLINQToSQLTechnology.aspx has resulted in the issue. The apostrophe data will not be searcahble if the WebCombo is a multiple columns WebCombo. A bug report has been submitted to our developer.
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