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
I would like to use contextmenu to reset defalute gird view, I first call
WebGrid1.ClientAction.RefreshAll() in the WebGrid1_InitializePostBack, then call WebGrid1.RetrieveStructure() method in the event handler WebGrid1_PrepareDataBinding, so far, everything is ok. but after I save the default view and close the page, thw reopen the page, I find by debugging that the WebGrid1.Roottable.columns' name is change to its Caption. it means the value of name and caption are same as caption's value. The code slip is as follow:
WebGrid1.RetrieveStructure() method in the event handler WebGrid1_PrepareDataBinding, so far, everything is ok. but after I save the default view and close the page, thw reopen the page, I find by debugging that the WebGrid1.Roottable.columns' name is change to its Caption. it means the value of name and caption are same as caption's value.
The code slip is as follow:
public partial class OwGrid1 : System.Web.UI.UserControl
{
protected void WebGrid1_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) {
WebGrid1.ClientAction.RefreshAll();
}
protected void WebGrid1_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e){
WebGrid1.RetrieveStructure();
RetrieveStructure() method provides a convenient way to retrieve column’s structure from assigned data source. Yes, you are correct that after RetrieveStructure() method is invoked, the column’s name is set to have same value as the column’s caption.
In order to set different column name, you can try to utilize the “OnLoad” server-side event of WebGrid. the snippet code below shows how to set column’s name and column caption in the corresponding event.
protected void WebGrid1_Load(object sender, EventArgs e) { WebGrid1.RootTable.Columns[0].Caption = "Shipper ID"; WebGrid1.RootTable.Columns[0].Name = "Code"; }
Hope this helps.
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