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.
Unfortunately, activation email could not send to your email. Please try again.

dropdowncalendarcontrol in grid

Thread ID:

Created:

Updated:

Platform:

Replies:

71666 Feb 8,2008 02:25 PM Feb 12,2008 06:41 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Tim Hatzenbeler
Asked On February 8, 2008 02:25 PM

when inserting a new record via gridgrouping, how do I do a 'findcontrol(dropdowncalendar) to retrieve my date.

The findcontrol does not seem to be working for me..

Thanks, Tim


Administrator [Syncfusion]
Replied On February 12, 2008 06:41 AM

Hi Tim,

Sorry for the delay in responding.

How do I do a 'findcontrol(dropdowncalendar) to retrieve my date?

You can use the below code snippet to retrieve the date :

[C#]
protected void GridGroupingControl1_BarButtonItemClicked(object source, Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemClickEventArgs e)
{
if (this.GridGroupingControl1.TableDescriptor.FormEditMode != TableEditMode.UseTemplateForm && this.GridGroupingControl1.TableDescriptor.FormEditMode != TableEditMode.UseInlineTemplateForm)
return;

if (e.ButtonBarItem.ButtonBarItemType == ButtonBarItemType.Save)
{
Record curRecord = this.GridGroupingControl1.FormEditCell.CurrentRecord;

TextBox tb = this.GridGroupingControl1.FormEditCell.FindControl("OrderID") as TextBox;
if (tb.Enabled)
curRecord.SetValue("OrderID", tb.Text);

tb = this.GridGroupingControl1.FormEditCell.FindControl("CustomerID") as TextBox;
curRecord.SetValue("CustomerID", tb.Text);

tb = this.GridGroupingControl1.FormEditCell.FindControl("OrderDate") as TextBox;
curRecord.SetValue("OrderDate", tb.Text);

this.GridGroupingControl1.Table.EndEdit();
e.Handled = true;
}

}


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

http://websamples.syncfusion.com/samples/Grid.Web/6.1.0.34/71666/main.htm

Please try this and let me know if this helps.

Regards,
G.Yavana




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.

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.

;