- Home
- Forum
- ASP.NET Web Forms (Classic)
- GridGroupingControl EditRow and Refresh server events
GridGroupingControl EditRow and Refresh server events
- Dec 11, 2006 04:26 PM UTC
- Dec 12, 2006 08:16 PM UTC
Are there any server events that are triggered with or Edit?
On Edit, I need to prep the custom objects in my.
On Refresh, I want to remove all filters in the FilterBar (reset all of them to "all").
Thanks in advance.
Jason
On Edit, I need to prep the custom objects in my
On Refresh, I want to remove all filters in the FilterBar (reset all of them to "all").
Thanks in advance.
Jason
SIGN IN To post a reply.
7 Replies
GB
Gokul B
Syncfusion Team
December 11, 2006 06:21 PM UTC
Hi Jason,
For your notification, GridGroup doesn't have the event which will taken with grid Edit. Instead you can use SourceListRecordChanging event which will occurs when a record in the underlying datasource is being added or changed( Editing in this scenario). Regarding your second query, please have a look at the below code snippet.
//Resets the ExpressionFields collection back to its default state
this.GridGroupingControl1.TableDescriptor.ResetGridRecordFilters();
To acheive the behavior as you excepted please call the above code on page refresh.
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
For your notification, GridGroup doesn't have the event which will taken with grid Edit. Instead you can use SourceListRecordChanging event which will occurs when a record in the underlying datasource is being added or changed( Editing in this scenario). Regarding your second query, please have a look at the below code snippet.
//Resets the ExpressionFields collection back to its default state
this.GridGroupingControl1.TableDescriptor.ResetGridRecordFilters();
To acheive the behavior as you excepted please call the above code on page refresh.
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
AD
Administrator
Syncfusion Team
December 11, 2006 08:49 PM UTC
B.,
Thanks for the quick reply.
I added your code in the following way:
...
protected void GridGroupingControl1_BarButtonItemClicked(object source, Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemClickEventArgs e)
{
if (e.ButtonBarItem.Text == "Reset")
{
GridGroupingControl1.TableDescriptor.ResetGridRecordFilters();
}
}
It takes two clicks to take effect and it doesn't reset the values in the FilterBar's
Thanks for the quick reply.
I added your code in the following way:
...
protected void GridGroupingControl1_BarButtonItemClicked(object source, Syncfusion.Web.UI.WebControls.Grid.Grouping.ButtonBarItemClickEventArgs e)
{
if (e.ButtonBarItem.Text == "Reset")
{
GridGroupingControl1.TableDescriptor.ResetGridRecordFilters();
}
}
It takes two clicks to take effect and it doesn't reset the values in the FilterBar's
GB
Gokul B
Syncfusion Team
December 11, 2006 09:45 PM UTC
Hi Jason,
please have a look at the below code snippet to achieve the behavior as you excepted.
//Clears all RecordFilter collection
this.GridGroupingControl1.TableDescriptor.ResetRecordFilters();
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
please have a look at the below code snippet to achieve the behavior as you excepted.
//Clears all RecordFilter collection
this.GridGroupingControl1.TableDescriptor.ResetRecordFilters();
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
AD
Administrator
Syncfusion Team
December 11, 2006 09:50 PM UTC
No, it doesn't.
It takes two clicks on my "Reset" custom button to get the data to refresh. And the FilterBar doesn't reset, only the data.
>Hi Jason,
please have a look at the below code snippet to achieve the behavior as you excepted.
//Clears all RecordFilter collection
this.GridGroupingControl1.TableDescriptor.ResetRecordFilters();
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
It takes two clicks on my "Reset" custom button to get the data to refresh. And the FilterBar doesn't reset, only the data.
>Hi Jason,
please have a look at the below code snippet to achieve the behavior as you excepted.
//Clears all RecordFilter collection
this.GridGroupingControl1.TableDescriptor.ResetRecordFilters();
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
GB
Gokul B
Syncfusion Team
December 11, 2006 11:41 PM UTC
Hi Jason,
We couldn't able to reproduce the issue as you mentioned. So we have attached our sample. please download our sample attached and do let us know if you are able to reproduce the issue in our sample.
Forum53240.zip
Before compile our sample, make sure that your installed version number is registered properly using register tag in .aspx file. Here we assumed that you are using 4.302.0.32 version.
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
We couldn't able to reproduce the issue as you mentioned. So we have attached our sample. please download our sample attached and do let us know if you are able to reproduce the issue in our sample.
Forum53240.zip
Before compile our sample, make sure that your installed version number is registered properly using register tag in .aspx file. Here we assumed that you are using 4.302.0.32 version.
Let us know if this helps.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
AD
Administrator
Syncfusion Team
December 12, 2006 04:33 PM UTC
Yes, Your example works fine.
The only difference I can see is that I am using a asp:SqlDataSource with a web.config populated ConnectionString. And my SelectCommand has one hard-coded SelectParameter.
Right now I can only reproduce one of my two problems. I can get it to reset on a single button click, but the FilterBar still shows the old filter (unlike your example). The 2nd problem (having to click the reset button twice) went away when I took out my TemplateForm.
The only difference I can see is that I am using a asp:SqlDataSource with a web.config populated ConnectionString. And my SelectCommand has one hard-coded SelectParameter.
Right now I can only reproduce one of my two problems. I can get it to reset on a single button click, but the FilterBar still shows the old filter (unlike your example). The 2nd problem (having to click the reset button twice) went away when I took out my TemplateForm.
GB
Gokul B
Syncfusion Team
December 12, 2006 08:16 PM UTC
Hi Jason,
We couldn't able to reproduce the issue as you mentioned. So we created a sample which will bind the Grid to sqlDataSource with FilterBar. But it doesn't reproduce any error as you mentioned. So could you please update us with sample which causes the issue. It will help us to come up with solutions.
Let us know if you need any other assist.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
We couldn't able to reproduce the issue as you mentioned. So we created a sample which will bind the Grid to sqlDataSource with FilterBar. But it doesn't reproduce any error as you mentioned. So could you please update us with sample which causes the issue. It will help us to come up with solutions.
Let us know if you need any other assist.
Thanks for using Syncfusion products.
regards,
B.Gokulkumar
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
AD Administrator
- Dec 11, 2006 04:26 PM UTC
- Dec 12, 2006 08:16 PM UTC