Add new row to bottom

Hi Syncfusion team,

is it possible to place to add new row of the gridgroupingcontrol to the bottom of the grid?

regards
Tuong Trinh

1 Reply

SI Silambarasan I Syncfusion Team December 1, 2014 11:01 AM UTC

Hi Tuong,

 

Thank you for using Syncfusion Products.

 

We would like to let you know that as per our implementation, changing position of Add New row is not feasible. So we have created a workaround for your requirement (“To place ADD NEW row at the bottom of the GridGroupingControl”) and it can be achieved by using the ClientSideOnLoadComplete client-side event. Please refer the below code snippets.

 

CODE SNIPPET:

 

[ASPX]

 

<Syncfusion:GridGroupingControl ID="GridGroupingControl1" runat="server" ShowGroupDropArea="true" AutoFormat="Office 2007 Blue"

DataSourceCachingMode="ViewState" ClientSideOnLoadComplete="onComplete(this)">

<TableDescriptor AllowFilter="False" AllowNew="true" AllowEdit="true">

</TableDescriptor>

</Syncfusion:GridGroupingControl>

 

[SCRIPT]

 

function onComplete(gridObj) {

var trElement = $("#" + gridObj.id + " table tr#" + gridObj.id + "\\~TR\\~0\\~_TOPGROUP_\\^\\#ADDNEW3\\#\\*R0").clone();

$("#" + gridObj.id + " table tr#" + gridObj.id + "\\~TR\\~0\\~_TOPGROUP_\\^\\#ADDNEW3\\#\\*R0").replaceWith("<tr style='display: none;'></tr>")

$($("#" + gridObj.id + " table")[0]).append(trElement);

}

 

For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link,

 

Link: SampleProject.zip

 

Please let us know if you need any further assistance.

 

Regards,

Silambarasan I


Loader.
Up arrow icon