Apr 23, 2013, 4:52 AM
Perform Edit and delete using grid panel and effect should be refrected to sql server database.
Below is my grid panel code:
below code that i have wrote in code behind file to fill grid panel:
What I need is edit and delete button to perform edit functionality and delete functionality.
<ext:GridPanel ID="GridPanel1" Header="false" runat="server" Title="Array Grid" Width="600" Height="320">
<Store>
<ext:Store ID="Store1" runat="server" RemoteSort="false" OnReadData="MyData_Refresh">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="company">
<Fields>
<ext:ModelField Name="SocialID" />
<ext:ModelField Name="SName" Type="String" />
<ext:ModelField Name="SURL" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ID="Column1" Visible="false" runat="server" Text="StudentId" DataIndex="SocialID" Flex="1">
</ext:Column>
<ext:Column ID="Column2" runat="server" Width="75" DataIndex="SName">
</ext:Column>
<ext:Column ID="Column3" runat="server" Width="250" DataIndex="SURL">
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>
below code that i have wrote in code behind file to fill grid panel:
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
BindSocial();
}
}
protected void BindSocial()
{
if (!X.IsAjaxRequest)
{
this.Store1.DataSource = SocialManager.GetSocialByP_PID(9);
this.Store1.DataBind();
}
}
protected void MyData_Refresh(object sender, StoreReadDataEventArgs e)
{
BindSocial();
}
What I need is edit and delete button to perform edit functionality and delete functionality.
Last edited by Daniil; Apr 23, 2013 at 5:31 AM.
Reason: Please use [CODE] tags