Hi
I am running into an issue while sorting a template column.I assigned all of the properties which is relate to sosrting in Grid. I managed to declare the template column as below
So since my project is subjected to bind as above mentioned scenario,please guide me to soleve the problem
--Thanks In Advance
I am running into an issue while sorting a template column.I assigned all of the properties which is relate to sosrting in Grid. I managed to declare the template column as below
| <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="18%" |
| HeaderText="Address1" SortExpression="Address1" DataField="Address1" UniqueName="Address1" GroupByExpression="Address1 Group By Address1" AllowFiltering="false"> |
| <ItemTemplate> |
| <asp:Label ID="lblAddress1" runat="server"></asp:Label> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
I also used to retrieve the data from DB and bind the same with the label control in the ItemDataBound event of the grid. The sample coding snippet i mentioned below..
| if (e.Item.OwnerTableView.Name == "Sales") |
| { |
| if ((e.Item.ItemType == GridItemType.AlternatingItem) || (e.Item.ItemType == GridItemType.Item)) |
| { |
| DataSet dsFirms = (DataSet)Session["Sales"]; |
| DataRowCollection drLocal = dsFirms.Tables[0].Rows; |
| System.Web.UI.WebControls.Label lblAddress1 = (System.Web.UI.WebControls.Label)e.Item.FindControl("lblAddress1"); // Address1 |
| if (iCount <= drLocal.Count) |
| { |
| lblAddress1.Text = drLocal[iCount]["Address1"].ToString(); |
| } |
| iCount++; |
| } |
| } |
So since my project is subjected to bind as above mentioned scenario,please guide me to soleve the problem
--Thanks In Advance