I am using WebDataGrid inside WebExplorerBar(wpShare). i need to specify datasource for this grid and bind it. In the previous version below code was used.
UltraWebGrid1.DataSource = shares.Tables[0]; UltraWebGrid1.DataBind();
Equivalent of this is? Tried this... Not working. Help me.
WebDataGrid grid = new WebDataGrid();
grid = (WebDataGrid)this.wpShare.Templates[0].FindControl("UltraWebGrid");
grid.DataSource = shares.Tables[0];
grid.DataBind();
Thank you,
Hello,
As you could see in the previously referenced links, accessing the WDG is achievable via the WebExplorerBar Groups. Navigate to the Group the WDG is located in and use the FindControl method.
WebDataGrid wdd = (WebDataGrid)this.WebExplorerBar2.Groups[0].Items[0].FindControl("WebDataGrid1") ;
In order to help you understand the concept of accessing a control in WebExplorerBar, I have created a simple code sample you could refer to. Refer to the attachment.
I have already visited those posts. But did not find any solution.
believe you may refer to the following resources:
WebExplorerBar structure and accessing its controls in code behind
WebExplorerBar used with user control
WebExplorerBar controls within Template have disappeared