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'm currently using the WebGrid as a trial and have run into the problem of inserting a WebCombo control into a cell grid for editing. I can get this working no problem when I use my code within a standard aspx page along with all my other controls however when I do exactly the same within a page which inherits from a master page I get a javascript pop up saying Title="Message from webpage" Text="Can't find WebCombo.NET instance with ID 'ctl00_MainContent_wcDefaultSites'"
I'm using ObjectDataSource to bind my grid, and the another ObjectDataSource to bind both my WebCombo and ValueList within the WebGrid Column. The "MainContent" referenced in the control ID that the message says it can't find is the ID of my ContentPlaceHolder.
Has anyone had this problem or can replicate it? A solution would be nice too
Thanks
Paul
Hello,
I've successfully replicated your issue on my end.
The error occurs because you set ClientIDMode to Static. When you use Master Page, the combo id will get changed and you could not use static id because it will detect as an incorrect id.
Try to set the ClientIDMode to AutoID and your project will work without any error.
Hope this helps.
Thank you.
Hello Paul,
Have you tried WebGrid's sample on IntegrationwithWebCombo.NET.aspx? This sample inherits from a master page as well that might be the same as your scenario.
Do you have any simple working sample that I can try from my end?
Hi Martin,
I've included a sample of what I can't get working.
Thanks for your time
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" UseDefaultStyle="True" Width="100%" Height="100%" DefaultStyleMode="Win7" DataSourceID="odsEmployees"> <LayoutSettings AllowColumnMove="Yes" AllowEdit="Yes" AllowExport="Yes" AllowFilter="Yes" AllowGrouping="Yes" AllowSelectColumns="Yes" AllowSorting="Yes" GroupByBoxVisible="True" AllowBatchUpdate="True" ColumnFooters="Yes" RowHeightDefault="30px" AllowAddNew="Yes" AutoHeight="True" RowChangedAction="OnTheFlyPostback" ContextMenuAnimation="true" AllowColumnFreezing="Yes"> <BatchUpdateSettings AllowReviewChanges="True" NotifyOnLostFocus="True"></BatchUpdateSettings> </LayoutSettings> <RootTable DataKeyField="Id" HeaderClickAction="SortMulti" GroupTotalVisible="True"> <Columns> <ISWebGrid:WebGridColumn Caption="No." DataMember="Id" DataType="System.Int32" Name="Id" Width="50px" IsAutoIncrement="True"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Payroll Id" DataMember="PayrollId" Name="PayrollId" Width="110px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Actual Site Code" DataMember="DefaultSiteCode" Name="DefaultSiteCode" Width="175px" EditType="WebComboNET" UseValueListForSorting="Yes" WebComboID="wcDefaultSites" FilterEditType="TextBox"> <ValueList DataMember="DefaultView" DataSourceID="odsSites" DataTextField="Code" DataValueField="Code"> </ValueList> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> <asp:ObjectDataSource ID="odsEmployees" runat="server" SelectMethod="GetByRole" TypeName="MyNameSpace.Employee" DataObjectTypeName="MyNameSpace.Employee" UpdateMethod="Update" InsertMethod="Insert"> </asp:ObjectDataSource> <asp:ObjectDataSource ID="odsSites" runat="server" SelectMethod="GetAll" TypeName="MyNameSpace.Site"> </asp:ObjectDataSource> <ISWebCombo:WebCombo ID="wcDefaultSites" ClientIDMode="Static" runat="server" DataSourceID="odsSites" DataTextField="Code" DataValueField="Code" Height="20px" Width="200px" UseDefaultStyle="True" DataMember=""> </ISWebCombo:WebCombo>
Yup I've got it solved now. I didn't actually mean to have ClientIDMode="static" in the version I sent to you; I tried that to solve my issue. To actually fix the problem I had to specifically set ClientIDMode="AutoID". I thought this was the default since I haven't specifically set the ClientIDMode anywhere within my control hierarchy. Which is the reason I didn't try it.
Thanks for your help on this issue, I've got another one now though which I'll post in another topic
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