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
Hello,
You can use ResizeBestFit() method to implement your scenario.
Here is the following code:
window.onload = function () { var WebGrid = ISGetObject("WebGrid1"); var GetCol = WebGrid.RootTable.Columns; var ColLength = GetCol.length; for (var i = 0; i < ColLength; i++) { GetCol[i].ResizeBestFit(); } }
Hope this helps. Thank you.
Hello Maged,
For your information, this issue has been fixed by the developer team and it will be available in the next hotfix build. Therefore, you may apply the latest hotfix update using Update Manager when the official hotfix is released.
Thank you.
Hello Indah,
I have created a sample file that replicates your scenario. In the sample, I simply bind WebGrid to Employee table using SqlDataSource. Before you run the sample, ensure that you have Northwind.mdf which is located in [Installation Folder]\Intersoft Solutions\WebUI Studio for ASP.NET\Data.
From the sample attached, I have successfully added a new row without any Javascript error that you have encountered. The issue might come from your SqlDataSource configuration.
Could you provide your SqlDataSource configuration, so that I can help checking what causes the error on your end?
Attached is the sample file for your reference.
Hello Andre,
Glad to hear the good news.
Should you have further questions, please feel free to post your issue in the community site and we will be glad to assist you.
Hi Maged,
I have replicated your scenario using WebGrid binding to WebService, and I did encounter the Javascript error when I added a new row in an empty grid.
I have reported this issue to the developer team to be processed. It will consider as a possible bug, but the issue needs to be investigated further.
I will let you know once I get the update from the developer team.
Hi Andre,
Glad to hear you have found out a way to edit the template.
In that sample, UXStackButton is using GridStyle in its StackMode. By using this mode, the text will be placed below the icon.
If you browse to the sample located in C:\Program Files\Intersoft Solutions\Intersoft WebUI Studio 2010 R1\Samples\SL4\ClientUI Samples\ClientUI.Samples.sln, you can view the styles that the UXStackButton used in that sample.
Please bear with me while I'm going to process your inquiry as soon as possible. I will try to create a basic sample for your reference.
Thanks.
You can pass the parameter using event.srcElement. Please refer to the following code:
function DoClick() { var SelectedColumn = event.srcElement.innerText; alert(SelectedColumn); }
To change background color via Server-side, you can use OnInitializeRow Server-side event such as following:
protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { e.Row.Style.BackColor = System.Drawing.Color.Red; }
To change background color via Client-side, you might want to refer to javascript code given by Frank Bruce. The code has been successfully tested and it will change the text color in your WebGrid.
You can still perform column clicking even when AllowSorting is set to No.
Using Listener.Add(), you can implement click function on the column's header without having to activate sorting in WebGrid.
window.onload = function () { var WebGrid1 = ISGetObject("WebGrid1"); var ColumnHeaderElement = WebGrid1.GetRootTable().GetElement(WG40.COLHEADER, WG40.HTMLTABLE); Listener.Add(ColumnHeaderElement, "onclick", DoClick); } function DoClick() { alert("Implement column click here."); }
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