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
Hi,
I use CalendarDropdown in my grid! and can I show the CalendarDropdown form when I click a button?
Hi Heny,
Deeply sorry for the mistaken, what I meant is if we are using WebInput as a Calender mode. The different between them is, only when we use WebInput, we can simply get its object by using ISGetObject("WebInput1"). Here is the snippet in order to do so:
function Button1_onclick() { var grid = ISGetObject("WebGrid1"); var getSelectedObject = grid.GetSelectedObject(); if (getSelectedObject != null) { getSelectedObject.ToRowObject().GetCells()[3].ActivateEdit(); setTimeout(function() { ISGetObject("WebInput1").ShowEditor(); }, 100); } else { alert("Please select a row first"); } }
Here is the snippet of WebInput code:
<ISWebInput:WebInput ID="WebInput1" runat="server" Height="20px" Width="140px"> <CultureInfo CultureName="en-US"> </CultureInfo> <DateTimeEditor IsEnabled="True"> <Behavior DropdownButtonToolTip="Tooltip on Dropdown button" /> </DateTimeEditor> </ISWebInput:WebInput>
However, if we use Calender DropDown, we will need to get the ID of dropdownlist and get them using document.GetElementyId. In this case, where DropDownList is attached to WebGrid, the ID will be set to <<WebGridID>>_CalDD, which is WebGrid1_CalDD.
For the last questions, by you meant "gridcell is edited", does it refer to the other cell besides the CalenderDropDown cell ? Or perhaps, do you mean that if any other cells in WebGrid is being edited, the CalenderDropDown is automatically shown ? Please provide me with more detail so that I can create a simple sample under your scenario.
I hope it helps. Thank you and have a nice day.
Best Regards,
Andi Santoso
In this case, since we are not using the WebCombo as a edit type, we will need to get the element of its dropdrownlist which attached to the WebGrid, after that, we can simply call the onclick event to trigger on showing the dropdownlist calender.
Here is the snippet:
function Button1_onclick() { var grid = ISGetObject("WebGrid1"); var getSelectedObject = grid.GetSelectedObject(); if (getSelectedObject != null) { var toRowObject = getSelectedObject.ToRowObject(); var getCell = toRowObject.GetCells().GetNamedItem("OrderDate"); getCell.ActivateEdit(); setTimeout(function() { document.getElementById("WebGrid1_CalDD").onclick(); }, 200); } else{ alert("Please select a row first"); } }
1.How to do if I use WebCombo ?
2.And what is "WebGrid1_CalDD" ?
3.How can I implement this effect:CalendarDropdown show when a gridcell is edited,and CalendarDropdown hide when this cell is not edited?
Heny
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