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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Inserting a new row - setting particular value in a cell and disabling it

Thread ID:

Created:

Updated:

Platform:

Replies:

73442 May 7,2008 09:49 AM UTC May 8,2008 02:29 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: GridGroupingControl
-
Asked On May 7, 2008 09:49 AM UTC

Hi, I'm inserting values in a new row in a GridGroupingControl. I want to set a particular value in one of the cells and disable such a cell so that it can't be modified by the user. How can I achieve these 2 actions please? Thanks.


Janagan [Syncfusion]
Replied On May 7, 2008 02:49 PM UTC

Hi MB,

You can insert values in a new row in the grid and then the particular cell in the row can be disabled by the celltype property in the barbuttonitemclicked event as mentioned in the code below:



protected void GridGroupingControl1_BarButtonItemClicked(object source, Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemClickEventArgs e)
{
if (e.ButtonBarItem.ButtonBarItemType == Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemType.EditRow)
{
this.GridGroupingControl1.TableDescriptor.AllowEdit = true;
}
if (e.ButtonBarItem.ButtonBarItemType == Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemType.Save)
{
this.GridGroupingControl1.TableDescriptor.Columns[0].Appearance.AnyRecordFieldCell.CellType = "Static";
}

}



Please refer the sample in the link below which illustrates the above:

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.40/Grid_ASP_datasourceupdation/main.htm


Please try running the sample and let me know if this helps.

Regards,
Janagan.



-
Replied On May 8, 2008 07:40 AM UTC

Thank you for your reply. I am afraid that there was some misunderstanding. I was referring to the case when inserting a NEW row, and not EDITING an existing row.
I want to set for example the word: "SUBMITTED" in a particular cell when double clicking on an empty row in order to insert a new entry. How can this be achieved please?
Thanks.


>Hi MB,

You can insert values in a new row in the grid and then the particular cell in the row can be disabled by the celltype property in the barbuttonitemclicked event as mentioned in the code below:



protected void GridGroupingControl1_BarButtonItemClicked(object source, Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemClickEventArgs e)
{
if (e.ButtonBarItem.ButtonBarItemType == Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemType.EditRow)
{
this.GridGroupingControl1.TableDescriptor.AllowEdit = true;
}
if (e.ButtonBarItem.ButtonBarItemType == Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemType.Save)
{
this.GridGroupingControl1.TableDescriptor.Columns[0].Appearance.AnyRecordFieldCell.CellType = "Static";
}

}



Please refer the sample in the link below which illustrates the above:

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.40/Grid_ASP_datasourceupdation/main.htm


Please try running the sample and let me know if this helps.

Regards,
Janagan.





Janagan [Syncfusion]
Replied On May 8, 2008 02:29 PM UTC

Hi,

Thanks for the update.

In the above sample, You can insert values in the grid by selecting the empty row in the grid. After updation, you can also disable the column.

Please refer the sample again in the link below which illustrates the above:

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.40/Grid_ASP_datasourceupdation/main.htm


Please try running the sample and let me know if this helps.

Thanks,
Janagan.




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;