Ok. This is driving me nuts, because I'm missing what's causing this to happen. I am creating RadGrid columns programmatically, using one grid (aspx page) for 7 different datasources, controlled by a Case statement. My problem is that if I click either on the Edit button( GridEditCommandColumn) or on the Delete button (GridButtonColumn), the Delete button disappears on postback. All other columns(GridBoundColumn) reappear just fine. Here is the snippet of code. It appears in a Page Load event. The DataSourceID is supplied with a NeedDataSource event which is why it is commented out in the snippet. What am I missing? Thanks in advance.
If
Not
IsPostBack
Then
Dim
intReport
As
Integer
= Request(
"Report"
)
Select
intReport
Case
0
' Comments
'rgDisplay.DataSourceID = "CommentsDS"
rgDisplay.MasterTableView.DataKeyNames =
New
String
() {
"CMT_REC_ID"
}
rgDisplay.Width = Unit.Percentage(90)
rgDisplay.PageSize = 5
rgDisplay.AllowPaging =
True
rgDisplay.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
rgDisplay.AutoGenerateColumns =
False
rgDisplay.Skin =
"Hay"
rgDisplay.MasterTableView.PageSize = 20
rgDisplay.MasterTableView.Width = Unit.Percentage(100)
rgDisplay.MasterTableView.EditMode = GridEditMode.InPlace
Dim
colEdit
As
GridEditCommandColumn
colEdit =
New
GridEditCommandColumn
colEdit.UniqueName =
"EditCommandColumn"
colEdit.ItemStyle.Width = Unit.Pixel(25)
rgDisplay.MasterTableView.Columns.Add(colEdit)
Dim
colDel
As
GridButtonColumn
colDel =
New
GridButtonColumn
colDel.Visible =
True
colDel.CommandName =
"Delete"
colDel.UniqueName =
"cmdDelete"
colDel.Text =
"Delete"
colDel.ItemStyle.Width = Unit.Pixel(25)
rgDisplay.MasterTableView.Columns.Add(colDel)
Dim
colBound
As
GridBoundColumn
colBound =
New
GridBoundColumn
rgDisplay.MasterTableView.Columns.Add(colBound)
colBound.DataField =
"CMT_REC_ID"
colBound.HeaderText =
"Number"
colBound.UniqueName =
"CMTRecID"
colBound =
New
GridBoundColumn
rgDisplay.MasterTableView.Columns.Add(colBound)
colBound.DataField =
"CMT_DESCRIPTION"
colBound.HeaderText =
"Description"
colBound.UniqueName =
"CMTDescription"
Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
Dim userControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
strID =
CType(userControl.FindControl("txtID"), TextBox).Text
DataComponent.SaveAsset(strID)
RadGrid1.MasterTableView.IsItemInserted = False
Me.RadGrid1.Rebind()
End Sub
Dim
clickedItem
As
RadPanelItem = RadPanelBar1.FindItemByUrl(Request.Url.PathAndQuery)
If
Not
(clickedItem
Is
Nothing
)
Then
clickedItem.ExpandParentItems()
Dim
childItem
As
RadPanelItem
For
Each
childItem
In
clickedItem.PanelBar.GetAllItems()
childItem.CssClass =
""
Next
childItem
clickedItem.CssClass =
"rpSelected"
End
If
tableView.set_currentPageIndex(0,
true
);
var
tableView = $find(radGridPracticesClientID).get_masterTableView();
tableView.rebind();
if
(currentPageIndex == 0) {
tableView.rebind();
}
else
{
// buggy - does not always rebind - e.g. when new results are less than 1 page
tableView.set_currentPageIndex(0,
true
);
}
var currentPageIndex = 0;
.
.
PageMethods.GetPracticesAndCount(currentPageIndex, pageSize,
sortExpressions, filterExpressions, installationID,
environmentalWeight, regulatoryWeight,
publicPerceptionWeight, healthAndSafetyWeight,
includeAspects, includeImpacts, checkedCommandIDs, selectedLocationIDs,
rebindPracticeGridResult);
}
function rebindPracticeGridResult(result) {
var tableView = $find("ctl00_PlaceHolderMain_Practice1_RadGridPractices").get_masterTableView();
tableView.set_dataSource(result.Practices);
tableView.dataBind();
tableView.set_virtualItemCount(result.PracticeCount);
}
Hello, please help me.
I uses RadFormDecorator and i want to change the font family of button
I apply this css style
.RadForm_Sitefinity.rfdButton input[type="button"].rfdDecorated
{
font: normal 11px Tahoma, Arial, Sans-serif !important;
}
it change only font-style and font-size but the font family is not change.
please help me
thank you