Dec 16, 2010, 3:47 PM
[CLOSED] GridPanel with Store and dynamic ObjectDataSource
I have a problem with a grid I am using. For objective reasons it is hard for me to post a full example as it is quite a complicated page but maybe someone can spot the issue from these hints:
I have a customized control that contains a store and a grid. The store is made public via a property of the user control to allow for changes. Then in the containing page I create an ObjectDataSource on the fly:
what could be the problem?
I have a customized control that contains a store and a grid. The store is made public via a property of the user control to allow for changes. Then in the containing page I create an ObjectDataSource on the fly:
ObjectDataSource ds = new ObjectDataSource("Truvo.Web.KWI.DB.SubPhrase", "ListFromText");
ds.SelectParameters.Add(new Parameter("Phrase", System.Data.DbType.String, Phrase));
ds.SelectParameters.Add(new Parameter("HeadingID", System.Data.DbType.Int32, Heading.ToString()));
ds.SelectParameters.Add(new Parameter("Locale", System.Data.DbType.String, Locale));
gridClassify.DataSource = ds;
gridClassify.DataBind();
now, when debugging I can see everything goes fine and the ajax response looks great (this is the relevant part of it):ctl00_ContentPlaceHolder1_winKeywordSplit_gridClassify_ClassifyStore.callbackRefreshHandler(response, {serviceResponse: {Data:{data:[{\"ID\":1,\"Text\":\"restaurant\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":2,\"Text\":\"à\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":3,\"Text\":\"buffet\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":3,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":4,\"Text\":\"tout\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":5,\"Text\":\"compris\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":6,\"Text\":\"ouvert\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":7,\"Text\":\"le\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":8,\"Text\":\"dimanche\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":3,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":9,\"Text\":\"à\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0},{\"ID\":10,\"Text\":\"charleroi\",\"HeadingId\":1480,\"Locale\":\"fr-BE\",\"BrandStatus\":0,\"BusinessNameStatus\":0,\"GenericStatus\":0,\"JunkStatus\":0,\"LocationNameStatus\":0,\"ProductStatus\":0,\"ServiceStatus\":0}], totalCount: 0},Success:true}}, ctl00_ContentPlaceHolder1_winKeywordSplit_gridClassify_ClassifyStore, o.eventType, o.action, o.extraParams);
but the grid does not contain any rows.what could be the problem?
Last edited by Daniil; Dec 20, 2010 at 2:22 PM.
Reason: [CLOSED]