You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/formdecorator/troubleshooting/decorated-gridview-is-not-bound-to-sqldatasource-with-controlparameter .md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ position: 2
10
10
11
11
# Decorated GridView Is Not Bound to SqlDataSource with ControlParameter
12
12
13
-
This help article offers a solution to an issue where a decorated asp:GridView by RadFormDecorator cannot be bound to an SqlDataSource with ControlParameter on initial page load.
13
+
This help article offers a solution to an issue where a decorated asp:GridView by RadFormDecorator cannot be bound to the SqlDataSource with a ControlParameter on initial page load.
14
14
15
15
**Problem:**
16
16
17
-
The asp:GridView cannot be bound on initial page load when it is decorated by RadFormDecorator and the GridView is bound to an SqlDataSource with ControlParameter. The issue can be reproduced with **Example 1**.
17
+
The asp:GridView cannot be bound on initial page load when it is decorated by RadFormDecorator and the GridView is bound to the SqlDataSource with a ControlParameter. **Example 1** shows how to reproduce the issue.
18
18
19
-
>caption **Example 1**: Decorated asp:GridView is not visible on initial page load when it is bound to an SqlDataSource with ControlParameter.
19
+
>caption **Example 1**: Decorated asp:GridView is not visible on initial page load when it is bound to the SqlDataSource with ControlParameter.
20
20
21
21
**ASP.NET**
22
22
@@ -44,11 +44,11 @@ The asp:GridView cannot be bound on initial page load when it is decorated by Ra
44
44
45
45
**Cause:**
46
46
47
-
In order to decorate all the controls on the page, the RadFormDecorator decorates the children controls of the complex controls as well (i.e., the RadFormDecorator iterates through the controls' collections).
47
+
In order to decorate all of the controls on the page, the RadFormDecorator decorates the children controls of the complex controls as well (i.e., the RadFormDecorator iterates through the controls' collections).
48
48
49
-
There is, however, a binding issue with the GridView when an SqlDataSource is used with ControlParameter and at the same time the GridView's collection is accessed from the code behind. This issue can be easily reproduced on a page with no Telerik UI for ASP.NET AJAX controls and is shown in **Example 2**. The problem also affect the scenario with RadFormDecorator from **Example 1**.
49
+
There is, however, a binding issue with the GridView when the SqlDataSource is used with a ControlParameter and at the same time, the GridView's collection is accessed from the code behind. This issue can be easily reproduced on a page with no Telerik UI for ASP.NET AJAX controls and is shown in **Example 2**. The problem also affects the scenario with the RadFormDecorator from **Example 1**.
50
50
51
-
>caption **Example 2**: asp:GridView cannot be bound to an SqlDataSource with ControlParameter when the GridView's collection is accessed from the code behind.
51
+
>caption **Example 2**: asp:GridView cannot be bound to the SqlDataSource with a ControlParameter when the GridView's collection is accessed from the code behind.
52
52
53
53
**ASP.NET**
54
54
@@ -87,7 +87,7 @@ There is, however, a binding issue with the GridView when an SqlDataSource is us
87
87
88
88
**Solution:**
89
89
90
-
There are a few options you can choose from, in order to handle the scenario described above.
90
+
There are a few options you can choose from in order to handle the scenario described above.
91
91
92
92
* Bind the DropDownList's data from the code behind instead of declaring the DataSourceID property of the DropDownList.
93
93
@@ -141,13 +141,13 @@ There are a few options you can choose from, in order to handle the scenario des
141
141
142
142
* Skip the following controls form decoration - GridFormDetailsViews, LoginControls, Textbox and ValidationSummary:
143
143
144
-
>caption **Example 4**: Skip the GridFormDetailsViews,LoginControls,Textbox and ValidationSummary controls from decoration.
144
+
>caption **Example 4**: Skip the GridFormDetailsViews,LoginControls,Textbox and ValidationSummary controls from decoration.
* Set the DataSourceID property of the DropDownList in the Page_Init event. This approach, however, will force the dropdownlist to rebind itself which may lead to performance issues for large data sources.
150
+
* Set the DataSourceID property of the DropDownList in the Page_Init event. This approach, however, will force the DropDownList to rebind itself, which may lead to performance issues for large data sources.
0 commit comments