Unigrid with Custom Table

Tanetta Jordan asked on May 13, 2015 21:41

I am trying to setup the unigrid to use a custom table and have been running into all sorts of issues. I have followed the Kentico tutorial successfully (docs.kentico.com/display/K82/UniGrid). But when i try to change the parameters to use a custom table as the object type, I get a "[AbstractUserControl.ShowMessage]: Page is not 'CMSPage' or missing messages placeholder" error. I've even tried to use a custom table datasource (see below). I'm not sure what i'm missing. I just want the basic functionality to work. Any thoughts?

<div class="cms-bootstrap">
        <ajaxToolkit:ToolkitScriptManager ID="manScript" runat="server" EnableViewState="false" />
        <asp:Label runat="server" ID="lblInfo" EnableViewState="false" Visible="false" />
        <cms:MessagesPlaceHolder ID="plcMess" runat="server" />
        <cms:CustomTableDataSource ID="ctDS" runat="server" CustomTable="customtable.SampleTable" SelectedQueryStringKeyName="ItemID" />
        <cms:UniGrid ID="ugSteps" runat="server" ShowObjectMenu="false" PageSize="All">
                <ug:Action Name="edit" CommandArgument="Name" Caption="$General.Edit$" Icon="Edit.png" />
                <ug:Action Name="delete" CommandArgument="Name" Caption="$General.Delete$"
                    Icon="Delete.png" Confirmation="$CheckoutProcess.ConfirmDefaultProcess$" />                   
                <ug:Action Name="view" Caption="$General.View$" FontIconClass="icon-eye" FontIconStyle="allow" />
                <ug:Column Source="##All##" Caption="$CheckoutProcess.Order$" Wrap="false" ExternalSourceName="StepOrder">
                <ug:Column Source="Caption" Caption="$CheckoutProcess.Caption$" Wrap="false">
                <ug:Column Wrap="false" Width="100%" />

protected void Page_Load(object sender, EventArgs e)
    // Registers the default CSS and JavaScript files onto the page (used to style the UniGrid)

    // Assigns a handler for the OnAction event
    //UserGrid.OnAction += userGrid_OnAction;

        ugSteps.DataSource = ctDS;
    catch (Exception ex)
        plcMess.ErrorText = ex.ToString();


Recent Answers

Brenden Kehren answered on May 22, 2015 21:25

I'd strip your control down to as little as possible and then try it. Remove the message placeholder, the ajax control toolkit reference (as Kentico already uses that, just have to reference <ajaxToolkit:ControlName>) and don't register the other pieces for css or js. Are you trying to use this outside of the CMS, like on a public facing page?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.