custome module

Posted by Community Admin on 04-Aug-2018 10:23

custome module

All Replies

Posted by Community Admin on 14-Mar-2012 00:00

hi. i m working the custome module
 i have some filed in that like city,country,albumid
 and need to populate the dropdown with
city and country
 DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
                     Type clpropertyType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.CL_Property.clproperty");
                 
                     // This is how we get the collection of CLProperty items
                      var myFilteredCollection = dynamicModuleManager.GetDataItems(clpropertyType).Where("Country = "+drpcountry .SelectedItem .Text +"");
                     // for new xml category R&d

                if (myFilteredCollection != null)
               
                  
                   
                        drpcountry.DataSource =myFilteredCollection;
                         drpcountry .DataTextField="City";
                         drpcountry .DataValueField="City";

                         drpcountry .DataBind ();
                 

                    drpsitefintycity.Items.Insert(0, new ListItem("--Select--", "0"));
               


 2 nd need to fatch filter further smthing like this for search result
 DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
                  Type clpropertyType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.CL_Property.clproperty");
                
                     // This is how we get the collection of CLProperty items
                     var myFilteredCollection = dynamicModuleManager.GetDataItems(clpropertyType).Where("Country = "+drpcountry .SelectedItem .Text +"").Where("City = "+drpsitefintycity .SelectedItem .Text +"");
                     // for new xml category R&d
                
                         if (myFilteredCollection != null)
                        
                                      foreach ( Telerik.Sitefinity.DynamicModules.Model .DynamicContent  v in myFilteredCollection)
                                     
                                        string albumID= v.GetValue("AlbumId").ToString ();



i get the error please   check , and pease check if this is the way to put 2 where clause(2 filter).
please reply ASAP


This thread is closed