I've done this several times in the past, but the one I just added will not work. I have a GridTemplateColumn with several LinkButtons with various CommandNames and CommandArguments. When you click on the link nothing happens, the OnCommandItem code is never hit. I'm not sure what I'm missing, I even have another one on t
Heres the code and the markup
protected
void
rgTCDashboard_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
switch
(e.CommandName)
{
case
"E2IAdd"
:
setUpRadWindow(e);
PageHelper.rwShowOpen(rwCERActivities.ClientID,
this
.Page);
break
;
case
"VREAdd"
:
setUpRadWindow(e);
PageHelper.rwShowOpen(rwCERActivities.ClientID,
this
.Page);
break
;
case
"VREPending"
:
setUpRadWindow(e);
PageHelper.rwShowOpen(rwCERActivities.ClientID,
this
.Page);
break
;
}
}
}
<
telerik:GridTemplateColumn
HeaderText
=
"VR&E 1-on-1"
UniqueName
=
"VRE"
AllowSorting
=
"false"
AllowFiltering
=
"false"
ItemStyle-HorizontalAlign
=
"Center"
HeaderStyle-HorizontalAlign
=
"Center"
>
<
ItemTemplate
>
<
asp:Image
ID
=
"imgVRE"
runat
=
"server"
Visible='<%# (string)Eval("VRE") == "Done" %>' ImageUrl="../../Images/CheckMarkMedium.png" />
<
asp:LinkButton
ID
=
"lkbVREAdd"
runat
=
"server"
Text
=
"Add"
Visible='<%# (string)Eval("VRE") == "Add" %>' CommandArgument='<%# "CerId" %>' CommandName="VREAdd" />
<
asp:LinkButton
ID
=
"lkbVREPending"
runat
=
"server"
Text
=
"Pending"
Visible='<%# (string)Eval("VRE") == "Pending" %>' CommandArgument='<%# "CerId" %>' CommandName="VREPending" />
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
I am using a User Control form to edit the rows in the second level of my hierarchy grid
Here is my grid definition
<telerik:radgrid runat="server" id="RadGridUCASRefs" showfooter="false" width="100%" enableajax="true" showstatusbar="true" allowautomaticinserts="false"
onitemcommand="RadGridUCASRefs_ItemCommand" onupdatecommand="RadGridUCASRefs_UpdateCommand" onitemcreated="RadGridUCASRefs_ItemCreated"
allowaddingrecords="false" autogeneratecolumns="false" allowsorting="false" allowpagesizeselection="False" onitemdatabound="OnItemDataBoundHandler" allowautomaticupdates="false"
allowpaging="True" skin="Bootstrap" pagesize="25" onneeddatasource="RadGridUCASRefs_NeedDataSource" onprerender="RadGridUCASRefs_PreRender" cssclass="table table-striped">
<MasterTableView AutoGenerateColumns="false" DataKeyNames="Student_reference" TableLayout="Auto" EditMode="EditForms" CommandItemDisplay="Top" RetainExpandStateOnRebind="false" HierarchyLoadMode="ServerBind" EnableHierarchyExpandAll="true" HierarchyDefaultExpanded="false">
<DetailTables>
<telerik:GridTableView AutoGenerateColumns="false" allowaddingrecords="false" DataKeyNames="Student_id,course_id,qualcode" Width="100%" EnableHierarchyExpandAll="true" CommandItemDisplay="None" EditMode="EditForms" name="GridRefs">
<Columns>
<telerik:GridEditCommandColumn HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="EditCommandColumn">
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="Student_id" HeaderText="Student ID" UniqueName="Student_id" runat="server" Display="false" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="qualcode" HeaderText="Subject Code" UniqueName="qualcode" Display="true" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="course_id" HeaderText="Class" UniqueName="course_id" Display="true" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="subject_name" HeaderText="Subject" UniqueName="subject_name" Display="true" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="grade" HeaderText="Name" UniqueName="grade" Display="False" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="complete_flag" UniqueName="complete" Display="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Complete" UniqueName="UCASComplete" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true">
<ItemTemplate>
<asp:LinkButton id="btnComplete" runat="server"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn DataField="Student_reference" HeaderText="Student ID" UniqueName="Student_reference" runat="server" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true">
</telerik:GridBoundColumn>
<telerik:GridCalculatedColumn DataFields="p_surname,p_forenames" HeaderText="Name" Expression='{1} + " " + {0}' UniqueName="student_name" Display="True" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridCalculatedColumn>
<telerik:GridBoundColumn DataField="p_surname" HeaderText="Name" UniqueName="p_surname" Display="False" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="p_forenames" HeaderText="Name" UniqueName="p_forenames" Display="False" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings UserControlName="~\Private\Components\Teaching\Teaching_Plan\Class_List\UCASReview.ascx" EditFormType="WebUserControl">
<EditColumn UniqueName="EditCommandColumn">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="True" />
</ClientSettings>
<SelectedItemStyle BackColor="Gray" BorderColor="Blue" BorderStyle="Dashed" BorderWidth="1px" />
</telerik:radgrid>
How do I set and get the data in the edit form for updating?
Hello
We use the RadTreeView in our site and all the nodes have his own context menu. The problem is when the node tree is so long and when we show the context menu with right clic, the context menu appears a few pixels higher than the clic was done. I attach a picture of that problem.
The node I clic is marked in yellow. I try with the Telerik example and the problem still continue. There is no CSS or custom styles.
Thanks in advance
Hi,
Can you please correct me where I'm wrong and educate me where I need it here - I've just discovered that the
Parent Node property of the RadTreeNode object is read-only and a couple things come to mind.
1.
I discovered this after writing some recursive sql to retrieve an entire branch (all descendants, all levels) of a root node. I populate my treeview via LoadOnDemand->WebMethod approach and in certain scenarios I want the option to retrieve either one level deep or the entire branch. I intended to populate the parentnode values as I built the tree but now see I cannot do that.
Do I have any options?
2.
It also seems that in a LoadOnDemand scenario, in order to re-establish your CurrentNode positioning (Selected, Focused, and In View) after a page reload you would have to (if Current Node was not a root node) load down the branch at
least to the level of the Current Node in order to establish positioning. Am I missing something? Is there a standard or best-practice approach to accomplishing this?
Why is Parent Node read-only? If the source code is available is it reasonable
to consider my own version where parent node is not read-only?
Thanks!
Eric
I am continuously receiving this error within my pages (through the javascript console)
SCRIPT5007: Unable to get property 'handleEvent' of undefined or null reference
Telerik.Web.UI.WebResource.axd (647,33)
It is within this chunk of code
}}if($telerik.useDetachEvent(c)){c.detachEvent("on"+d,a);
}else{if(c.removeEventListener)
{c.removeEventListener(d,a,false); // <<<<
} //<<<<
}b.splice(f,1);
Me thinks something is wrong with the Telerik.Web.UI.WebResource.axd resource handler.
I would like to generate large XLSX and CSV file in MVC as given on below URL
http://demos.telerik.com/aspnet-mvc/spreadstreamprocessing
I am unable to download Model and Class File above example.
1) using Telerik.Documents.SpreadsheetStreaming;
2) using Kendo.Mvc.Examples.Models.SpreadStreamProcessing;
3) DocumentSettings class
Please help me to resolve this issue.
Thanks in adv.
Hi,
We are placing markers when the user clicks on the map. A problem is that the OnClick event is also fired when the user clicks on one of the zoom-buttons (but not on one of the pan-buttons).
Is there anyway to separate a button click from a normal click? Alternative solutions could be using right clicks or even click/drag a marker itself.
Kind regards
Robert
dv = dtFast.DefaultView
dv.RowFilter =
"buot_BaseUnitID = buot_BareFanBaseUnitID"
Me.rgFast.DataSource = dv
dv is filtered, DT has 248 rows, DV has 182
but my grid is still showing all 248 rows.
What am I missing?