Anyone know how to bind a SolrNet result set to a GridView control? I suspect it involves ObjectDataSource but I can’t seem to get the right thing thrown together. Any help would be appreciated, I need this part done quickly.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since a SolrNet result set implements
IList<T>, you can just bind to a GridView with a few<asp:BoundField>s (one for each property you want to bind) in the aspx, and passing the result object as DataSource before calling DataBind()See also Binding Gridview to IList<BusinessObject> that contains an IList<BusinessObject>