Click here to Skip to main content
15,306,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
im create store producre
i want connect to web grid
how bind data from store producer
alter PROCEDURE [dbo].[GroupGallery]
     select ID_GGallery,FGroupGallery ,[dbo].[Groupgallary-get-countpic](ID_GGallery) as countpic,Fpic from groupgalleries

@model store producer
    ViewBag.Title = "مدیریت تصاویر";
    <link href="@Url.Content("~/Content/webgrid.css")" rel="stylesheet" type="text/css" media="all" />
    Layout = "~/Areas/admin/Views/Shared/_AdminLayout.cshtml";
    var grid = new WebGrid(
     source: Model,
     defaultSort: "ID_GGallery",
     rowsPerPage: 50,
     canPage: true,
     canSort: true,
     selectionFieldName: "SelectedRow"
    int rowVal = 0;

1 solution

You can not assign stored procedure as data source to some control - you must do it via the model...
See here some options you may have:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900