We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

User control problem

Hi
I created ASP.NET Usercontrol using GridGroupingControl. How can I access or call manuall in my calling page.
Example:
Default.aspx page will access usercontrol and assign datasource as well.

Kindly provide me some example on this.

Thank you



1 Reply

RS Rajarajeswari S Syncfusion Team July 6, 2008 09:24 AM UTC

Hi,

Sorry for the delay in responding you.

We have to access the GridGroupingControl from the access page and then only we can use it. Please refer the below code snippet which illustraates this:

GridControl.ascx:

$script runat="server">
public GridGroupingControl GroupingGrid
{
get
{
return this.GridGroupingControl1;
}
}
$/script>

$sfwg:GridGroupingControl ID="GridGroupingControl1" runat="server" DataSourceCachingMode="ViewState" DataMember="DefaultView" AutoFormat="Office 2003 Blue" BorderCollapse="Separate">
$/sfwg:GridGroupingControl>

CallingPage.aspx:
$%@ Register src="GridControl.ascx" tagname="GridControl" tagprefix="uc1" %>

$uc1:GridControl ID="GridControl4" runat="server">$/uc1:GridControl>

CallingPage.aspx.cs:

this.GridControl4.GroupingGrid.DataSource=dt;

Note:
"$" is used instead of "<".

Please refer the sample from the below link, which illustrates the above:

http://www.syncfusion.com/support/user/uploads/UserControl_76d3f8e7.zip

Please let me know if you have any other concerns.

Regards,
Raji


Loader.
Live Chat Icon For mobile
Up arrow icon