My project gives me an error when i'm trying to render a name instead of the ID from Store1.

It's on the client side I get the error. ( 'Store2' is not defined )

The specific column :
 


<ext:Column Width="180" Header="Leverandør" DataIndex="SupplierId" Hidden="false">


<Renderer Fn="MyFunction" />


</ext:Column>
Store2 :





<asp:SqlDataSource ID="LeverandoerDS" runat="server" ConnectionString="<%$ ConnectionStrings:Ordresystem %>"SelectCommand="SELECT * FROM [Suppliers] ORDER BY [Name]"></asp:SqlDataSource>
<ext:Store ID="Store2" runat="server" AutoLoad="true">
<Reader>
<ext:JsonReader ReaderID="SupplierId">
<Fields>
<ext:RecordField Name="SupplierId" />
<ext:RecordField Name="Name" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
Javascript :
<script type="text/javascript">
var MyFunction = function(value) {
var r = Store2.getById(value);
if (Ext.isEmpty(r)) {
return "";
}
return r.data.Name;
}
</script>
How do i solve this problem ? Have been trying differetn things such as binding the data in pageload but with no success.