I'm not sure where this is going wrong, but any help would be appreciated.
I'm trying to add a column to an edit column to a grid (I also want to add a delete column, but I haven't gotten that far yet). I can make the column display without a problem, but the moment I click the button I get very odd results - the button disappears, my column headers move across and one of the bits of content from another of my columns vanishes entirely. I found it rather funny at first, but then I couldn't find out why it was doing it.
My code is below.
Private Sub rgdTable_DetailTableDataBind(ByVal source As Object, ByVal e As GridDetailTableDataBindEventArgs) Handles rgdTable.DetailTableDataBind Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem) Select Case e.DetailTableView.Name Case "TUGDetailTable" Dim myTrackingGUID As Guid = New Guid(dataItem.Item("MerchantTrackingGUID").Text) Dim myDataSet As New DataSet '===Get the DetailTable data=== myDataSet = *get data from database* myDataSet.Tables(0).Columns.Remove("Source") myDataSet.Tables(0).Columns.Remove("@Action") e.DetailTableView.DataSource = myDataSet e.DetailTableView.CommandItemDisplay = GridCommandItemDisplay.Top e.DetailTableView.CommandItemSettings.AddNewRecordImageUrl = "../Img/AddRecord.gif" e.DetailTableView.CommandItemSettings.AddNewRecordText = "Add New TUG Details" e.DetailTableView.CommandItemSettings.ShowRefreshButton = False e.DetailTableView.EditFormSettings.EditColumn.UniqueName = "EditCommandColumn1" e.DetailTableView.EditFormSettings.UserControlName = "../UserControls/Templates/TUGAdd.ascx" e.DetailTableView.EditFormSettings.EditFormType = GridEditFormType.WebUserControl Dim editCol As GridEditCommandColumn editCol = New GridEditCommandColumn editCol.UniqueName = "EditColumn" editCol.HeaderText = "" editCol.HeaderStyle.Width = 20 editCol.EditImageUrl = "~\img\edit.gif" editCol.ButtonType = GridButtonColumnType.ImageButton editCol.EditFormColumnIndex = 0 e.DetailTableView.Columns.Add(editCol) End SelectEnd Sub
I know that this is not the exact wording of the pop-ups and drop-downs.
I get a drop-down from Telerik in visual studio stating that there is a new update; I select ok. Even if I go and update the project from the menu bar, I get the error when I run up the page. Sometimes I will see the issue right when looking at the page in design mode.
The way I have been fixing the issue, delete the reference and reassociate the Telerik reference. I believe that then the project is not using he newest Telerik controls.
I have no custom skins or controls.
Error:
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadToolTip, {"_cssClass":"","_manualCloseButtonText":"Close","clientStateFieldID":"ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageUSGToolTip_ctl00_ClientState","formID":"aspnetForm","relativeTo":1,"skin":"USGFOEXTelerik","targetControlID":"ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageImage","text":"Dit is een bericht verkregen uit hercules:\u003cbr /\u003ede status is ToValidate"}, null, null, $get("ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageUSGToolTip_ctl00"));
});