首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

webgrid 中返回存储过程有关问题,肯定结

2012-03-21 
webgrid 中返回存储过程问题,在线等,肯定结。我在web页中拖放了一个radgridradG:RadGridID RadGrid1 ru

webgrid 中返回存储过程问题,在线等,肯定结。
我在web页中拖放了一个radgrid
  <radG:RadGrid   ID= "RadGrid1 "   runat= "server "   AllowPaging= "True "   AllowSorting= "True "
                        DataSourceID= "SqlDataSource1 "   EnableAJAX= "True "   GridLines= "None "   Height= "335px "
                        Skin= "Web20 "   Width= "454px ">
                        <ClientSettings>
                                <Scrolling   AllowScroll= "True "   UseStaticHeaders= "True "   />
                        </ClientSettings>
                        <MasterTableView   AutoGenerateColumns= "False "   DataSourceID= "SqlDataSource1 ">
                                <ExpandCollapseColumn   Visible= "False ">
                                        <HeaderStyle   Width= "19px "   />
                                </ExpandCollapseColumn>
                                <RowIndicatorColumn   Visible= "False ">
                                        <HeaderStyle   Width= "20px "   />
                                </RowIndicatorColumn>
                        </MasterTableView>
                </radG:RadGrid>


绑定到存储过程

<asp:SqlDataSource   ID= "SqlDataSource1 "   runat= "server "   ConnectionString= " <%$   ConnectionStrings:urgentConnectionString   %> "
                        SelectCommand= "LightQuery "   SelectCommandType= "StoredProcedure ">
                        <SelectParameters>
                                <asp:ControlParameter   ControlID= "TextBox1 "   DefaultValue= "% "   Name= "PartNr "   PropertyName= "Text "
                                        Type= "String "   />
                        </SelectParameters>
                </asp:SqlDataSource>



存储过程中的变量绑定到TextBox1

    <asp:TextBox   ID= "TextBox1 "   runat= "server "> </asp:TextBox>
然后在添加    
<asp:Button   ID= "Button1 "   runat= "server "   OnClick= "Button1_Click "   Text= "Button "   />

想单击button   时候绑定刷新textbox   的值来实现查询
        protected   void   Button1_Click(object   sender,   EventArgs   e)
        {
                PostBackOptions   myPostBackOptions   =   new   PostBackOptions(this);


                myPostBackOptions.AutoPostBack   =   true;


             
        }
运行后页面可以刷新,但是没有纪录返回。
如果单单存储过程中没有变量时候,不绑定到textbox时候,grid显示出纪录
请教如何解决。多谢!

[解决办法]
没用过webGRID,是个什么东东?
[解决办法]
我也没用过,
第三方控件的那么多,
楼主你应该找它的说明或者事例看看,

[解决办法]
PostBackOptions 这类干嘛的?
不会有是 Page.IsPostBack 问题吧?

热点排行