T4 Templates : Reading resulting columns of a stored procedure table -


i learning t4 templates right now, , examples got on internet using tables code generation. want use stored procedure result columns generate automated ui, possible? or have create view same query? in case, how read view?

thanks in advance.

i got solution , here how can generate rad grid directly sp name

  <# 'requires: <#@ assembly name="system.data" #>   dim server new server(".\sqlexpress")     dim database new database(server, "xxxx")     dim strspname string= "sp_xxxx"     dim dt system.data.datatable= database.executewithresults("exec sp_getequipment").tables(0)     dim ctlname string = "grdeqp" #> <telerik:radgrid id="grd" runat="server" skin="web20" autogeneratecolumns="false"> <mastertableview> <columns>  <#     each column system.data.datacolumn in dt.columns #><telerik:gridboundcolumn datafield="<#=column.columnname #>" headertext="<#=column.columnname  #>"/> <#next#> </columns>                 </mastertableview> </telerik:radgrid>  

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -