muthukumar

muthukumar

  • NA
  • 0
  • 101.3k

Gridview Row increase

Aug 26 2014 3:21 AM
here when i entered the + symbol at the bottom gridview i want to increase a gridrow with a sequential number without reload a page
my coding is
 
for Gridview Bind
------------------------------
 
 
  DataTable dt = new DataTable();
                dt.Columns.AddRange(new DataColumn[3] { new DataColumn("totalprice"), new DataColumn("Price"), new DataColumn("Quantity") });
                dt.Rows.Add("");
                dt.Rows.Add("", "", "");
                dt.Rows.Add("", "", "");
                dt.Rows.Add("", "", "");
                dt.Rows.Add("", "", "");
                dt.Rows.Add("", "", "");

                grid_productdetails.DataSource = dt;
                grid_productdetails.DataBind();
 
 
For Dropdown I use Row data Bound
--------------------------------------------------

var hostWeb = Page.Request["SPHostUrl"];
using (var clientContext = TokenHelper.GetClientContextWithContextToken(hostWeb, contextToken, Request.Url.Authority))
{

clientContext.Load(clientContext.Web, web => web.Title);
clientContext.ExecuteQuery();
List list = clientContext.Web.Lists.GetByTitle("IGRID_ProductMaster");
clientContext.Load(list);
clientContext.ExecuteQuery();
CamlQuery query = CamlQuery.CreateAllItemsQuery(100);
//ListItemCreationInformation newItem = new ListItemCreationInformation();
Microsoft.SharePoint.Client.ListItemCollection oitmcoll = list.GetItems(query);
clientContext.Load(oitmcoll);
clientContext.ExecuteQuery();


DropDownList drplist = (DropDownList)(e.Row.FindControl("ddl_product"));

foreach (Microsoft.SharePoint.Client.ListItem listItem in oitmcoll)
{
try
{
//drplist.SelectedIndex = 0;

drplist.Items.Add(listItem["Productname"].ToString());


}
catch (Exception ex)
{
}

}

 
 
 
 
 
 
 
in these when i click a whole dropdown go to ---Select----