i saw many posts about this but none seemed fixing my issue.
I have a ASP:PlaceHolder (ph).
I thought this would work fine:
I have a ASP:PlaceHolder (ph).
I thought this would work fine:
protected void Page_Load(object sender, EventArgs e) |
{ |
SqlDataSource ds = new SqlDataSource(); |
ds.ConnectionString = "Data Source=HNT;Initial Catalog=dbL;Persist Security Info=True;User ID=usB;Password=xxx"; |
ds.SelectCommand = "SELECT aID,AName FROM tbl where LID=36"; |
ds.InsertCommand = "INSERT INTO tbl (LID, AName) VALUES (12, 'Test')"; |
Telerik.Web.UI.RadGrid rg = new Telerik.Web.UI.RadGrid(); |
rg.DataSource = ds; |
rg.MasterTableView.DataKeyNames = new string[] { "aID" }; |
rg.MasterTableView.AllowAutomaticDeletes = true; |
rg.MasterTableView.AllowAutomaticInserts = true; |
rg.MasterTableView.AllowAutomaticUpdates = true; |
rg.MasterTableView.CommandItemDisplay = Telerik.Web.UI.GridCommandItemDisplay.Top; |
ph.Controls.Add(rg); |
} |
The values of insert are hard coded for simplicity (it does not work niether with values nor with parameters).
The grid displays fine as expected.
When i hit the insert it shows the insert form as expected.
However when i ctry to save the form (by hitting the insert button) it does not post the command.
No error, and even tried putting an event for inserting but it does not seem to fire at all.
am i missing something?
thank you