Hi
I have a radgrid that uses a WebUserControl in the EditForm mode. When you edit a line the Webusercontrol is shown in the grid but the item row is also show. Is it possible to hide this line?
See in attachment an example of the radgrid, the block surrounded with the blue line (I'm not a drawing artist as you can see :-) ) is the block that should be hidden.
Kind regards
Suzy
4 Answers, 1 is accepted
0
Hello Suzy,
Looking at the attached screenshot and taking into account your requirement I am not sure that I understand your exact scenario and especially, how the outlined elements in the screenshots are part of the edited item and not from the WebUserControl. Nevertheless, if you need to hide the item for which the edit form is opened, you can use the following CSS:
If I misunderstood you, please provide detailed information on the exact scenario and the markup of your RadGrid and the WebUserControl.
Kind Regards,
Konstantin Dikov
Telerik
Looking at the attached screenshot and taking into account your requirement I am not sure that I understand your exact scenario and especially, how the outlined elements in the screenshots are part of the edited item and not from the WebUserControl. Nevertheless, if you need to hide the item for which the edit form is opened, you can use the following CSS:
<style>
div.RadGrid .rgEditRow{
display
:
none
;
}
</style>
If I misunderstood you, please provide detailed information on the exact scenario and the markup of your RadGrid and the WebUserControl.
Kind Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Suzy
Top achievements
Rank 2
answered on 23 Oct 2015, 06:17 AM
Hello Konstantin,
I tried your suggestion but the only thing that is disappearing is the line with the update and delete icon, not the item-line.
Here is my code how the radgrid is defined :
<
telerik:RadGrid
ID
=
"grdTicketHistory"
runat
=
"server"
Width
=
"97.5%"
AutoGenerateColumns
=
"false"
Skin
=
"WebBlue"
OnNeedDataSource
=
"grdTicketHistory_NeedDataSource"
OnItemDataBound
=
"grdTicketHistory_ItemDataBound"
OnUpdateCommand
=
"grdTicketHistory_UpdateCommand"
OnDeleteCommand
=
"grdTicketHistory_DeleteCommand"
OnInsertCommand
=
"grdTicketHistory_InsertCommand"
OnItemCommand
=
"grdTicketHistory_ItemCommand"
>
<
MasterTableView
AllowSorting
=
"true"
Width
=
"100%"
EditMode
=
"EditForms"
AllowPaging
=
"true"
PageSize
=
"10"
AllowFilteringByColumn
=
"false"
DataKeyNames
=
"TicketLogID"
CommandItemDisplay
=
"Top"
ShowHeader
=
"false"
InsertItemPageIndexAction
=
"ShowItemOnCurrentPage"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
AlwaysVisible
=
"true"
/>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
ItemStyle-Width
=
"20px"
></
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
UniqueName
=
"DeleteCommandColumn"
Text
=
"Delete"
CommandName
=
"Delete"
ItemStyle-Width
=
"20px"
ButtonType
=
"ImageButton"
ConfirmText
=
"Are you sure you want to delete this record?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
/>
<
telerik:GridTemplateColumn
><
ItemStyle
Width
=
"100%"
/></
telerik:GridTemplateColumn
>
</
Columns
>
<
DetailItemTemplate
>
<
section
style
=
"width:10%"
class
=
"SectionLeft"
>
<
div
>
<
asp:Label
ID
=
"lblUser"
runat
=
"server"
Text='<%# Eval("UserCreated")%>' />
</
div
>
<
div
>
<
asp:Label
ID
=
"luLogDate"
runat
=
"server"
Text='<%# Eval("LogDate","{0:dd/MM/yyyy}") %>' />
</
div
>
<
div
>
<
asp:Label
ID
=
"luLogTime"
runat
=
"server"
Text='<%# Eval("LogTime", "{0:00:00:00}") %>'></
asp:Label
>
</
div
>
<
div
>
<
asp:Label
ID
=
"lblReference"
runat
=
"server"
Text='<%# Eval("Reference") %>'></
asp:Label
>
</
div
>
<
div
>
<
asp:Label
id
=
"lblTimeRegistration"
runat
=
"server"
Font-Bold
=
"true"
></
asp:Label
>
</
div
>
</
section
>
<
section
style
=
"width:89%;border-left:solid;border-left-width:0.08em;border-left-color:#dae2e8"
class
=
"SectionLeft"
>
<
div
>
<
asp:Label
id
=
"lblActivity"
Font-Bold
=
"true"
runat
=
"server"
Text='<%# CartaMundi.BusinessLogic.Codes.GetDescription(cmWeb.Classes.Constants.SYSTEM_ICT,"ACTCOD",Eval("Activity"))%>'></
asp:Label
>
</
div
>
<
div
>
<
telerik:RadEditor
runat
=
"server"
ID
=
"txtLogText"
Enabled
=
"false"
EditModes
=
"Preview"
Width
=
"97.5%"
Height
=
"100%"
CssClass
=
"RadEditorOverflow"
></
telerik:RadEditor
>
</
div
>
</
section
>
</
DetailItemTemplate
>
<
EditFormSettings
UserControlName
=
"TimeRegistrationEdit.ascx"
EditFormType
=
"WebUserControl"
>
<
PopUpSettings
Modal
=
"true"
Width
=
"1000px"
/>
<
EditColumn
ButtonType
=
"ImageButton"
/>
<
EditColumn
UniqueName
=
"EditCommandColumn1"
></
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
Kind regards
Suzy
0
Accepted
Hello Suzy,
If you need to hide the DetailItemTemplate of the edited item you could use the following CSS selector instead:
The above selector will hide the TR element following the edited item, which will be the DetailItemTemplate.
Regards,
Konstantin Dikov
Telerik
If you need to hide the DetailItemTemplate of the edited item you could use the following CSS selector instead:
<style>
div.RadGrid .rgEditRow + tr {
display
:
none
;
}
</style>
The above selector will hide the TR element following the edited item, which will be the DetailItemTemplate.
Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Suzy
Top achievements
Rank 2
answered on 29 Oct 2015, 08:05 AM
Hi Konstantin,
that is exactly what I need. Thank you
Kind regards
Suzy