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 am using Webgrid7, .NET3.5 in my project. In that for two columns I am using cellTemplate.
When the page loads first time it it working fine but when I click on grid refresh or click on column header to sort, the cell template values are not showing.
these are my grid cell templte columns
<ISWebGrid:WebGridColumn Name="Type" ColumnType="Template"> <CellTemplate> <asp:Label ID="labelType" runat="server" Text='<%# GetReportType(Eval("isTableReport")) %>'></asp:Label> </CellTemplate> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Name="ImportTags" ColumnType="Template"> <CellTemplate> <asp:ImageButton ID="buttonImport" runat="server" ImageUrl="../Content/CSS/Themes/Default/images/Import-16px-b.png" Visible='<%# ShowImport(Eval("isTableReport")) %>' ToolTip="Click to import" OnClientClick="Editing('Import');return false;"/> </CellTemplate> </ISWebGrid:WebGridColumn>
The following methods are created in server side and called in cell templates
protected string GetReportType(object isTableReport) { string str = string.Empty; if ((bool)isTableReport) { str = "No"; } else { str = "Yes"; } return str; } protected bool ShowImport(object isTableReport) { bool enable = false; if ((bool)isTableReport) { enable = false; } else { enable = true; } return enable; }
this grid datasource is object List.
Please provide some sample code which works fine if I use two celltemplate columns for same value.(in the above example it is "isTableReport")
Thanks.
Hi psr,
This matter happen because the when FlyPostBack the value of buttonImport copied to labelType cell template. To resolve this matter, I simply make labelType Visibility to true on InitializeRow and this matter doesn't occurs anymore. I also attach my sample here. Could you look for my sample and tell me if this sample doesn't meet your requirement? Hope this helps.
Regards,Bernard
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