Custom Template Column

  1. #1

    Custom Template Column

    I'm using Ext 1.0 with .NET Framework 4.0. I have a standard ASP.NET gridview control with Template field.
    Here is a Code for HTML markup:
     <asp:TemplateField HeaderText="Media(s)"  >
         <a href="Media.aspx?MID=<%=intModuleID %>&Mod=<%=strMod %>&DataID=<%# DataBinder.Eval(Container.DataItem,"ClientId") %>" > ( <%# GetMedia(intModuleID, DataBinder.Eval(Container.DataItem, "ClientId"))%>  ) </a>
      <ItemStyle HorizontalAlign="Center" Width="5%" />
    Here intModuleID is public Integer and strMod is public string variables in my code behind file. ClientId is a field from DataTable and GetMedia is public function in my code behind file which is being called everytime I bind data to my gridview.

    Here is code for the function:
    Public Function GetMedia(ByVal ModuleID As Integer, ByVal DataId As Integer) As Integer
    		Dim objMedia As New clsMedia
                    ''Get number of media available for client using moduleId and DataId
                    dim intMediaCount as Integer =  objMedia.GetMediaCountForClient("Database Query")
    		return intMediaCount
    	End Function
    How can I achieve the same in Ext template column in gridpanel or is there any other way to do it in Ext ?

    Please help me.

  2. #2
    Did you ever find a solution?
  3. #3
    I never got any reply from Ext team on this topic.
    Fortunately, I could solve the problem by adding required column in sql query result so bind the value using regular column.
    I'm not sure If it may be the case for you.
    All the best !!!


Similar Threads

  1. Format Number in GridPanel Template Column
    By pooja in forum 1.x Help
    Replies: 0
    Last Post: May 04, 2012, 10:43 AM
  2. [CLOSED] Using custom template in a ComboBox
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 28, 2011, 4:06 PM
  3. [CLOSED] Custom Template From CodeBehind
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 10, 2009, 10:35 AM
  4. Custom Grid Header Template
    By mathec in forum 1.x Help
    Replies: 2
    Last Post: Jan 30, 2009, 8:20 PM
  5. [CLOSED] Grouping View Custom Template
    By peterdiplaros in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Dec 08, 2008, 2:22 PM

Posting Permissions