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
Latest Development Blogs
ForumPostTopic
Browse By Tag
hi,
i would like to setup a grid. In which one column contains the image depending on the value in the next column. I know , how to do this from the backend. Can you please tell me , how can i do this from the javascript.
if possible , please send one example or link to example
thanks and regards
ca
Hi CA,
I have attached a simple sample of your scenario.
im using a button as a trigger to change the image on Images column.
Im using GetSelectedObject on my sample, so the image wont change until you select a row then hit the button.
Hope this can resolve your issue.
Best regards,
Niven Prasetya.
thank you for reply,
My scenario is little different from the example you have given.
I have to setup image on the column at the time of loading the page. and image should be dynamic depending on the value of the some column. For example i am using the image on the first column and these image depending on the value on the second. if second column contains value pdf , then first column shows pdf.jpg . if second column contains doc, then first column contains doc.jpg. And all these should be come at the time of page loading not in any button click. and from the front end.
thanks nad regards
Hi Ca,
I have replicate a sample based on your scenario.
Below is part of the code which i wrote for your sample.
var BasedOn1 = WebGrid1.RootTable.GetRow(0).GetCells()[1]; var row1 = WebGrid1.RootTable.GetRow(0); var cell1 = row1.GetCells()[0].CellElement.childNodes[0]; if (BasedOn1.Text == 1) { cell1.setAttribute("src", "./images/steven.jpg", true); }
The image(cell1) will be change based on the EmployeeID(BasedOn1).
<ISWebGrid:WebGridColumn Caption="Image" Name="Image" CellImage=".\images\anne.jpg" Width="100px" ColumnType="Image" EditType="NoEdit">
Please keep that in mind, you have to declare an images first on WebGrid using a CellImage Tag or the src will not be shown on client side.
Hope this one can resolve you issue.
Niven Prasetya
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