or
I have a radgrid which has a OnItemCommand (server event) , when I put in the clienevent OnCommand
the server event is not being fired - any ideas why ? If I remove the clientevent - OnCommand="OnGridCommand" then everything works fine.
| <telerik:RadGrid ID="gridInvLines" AllowPaging="False" Skin="Office2007" |
| runat="server" AutoGenerateColumns="False" DataSourceID="odsInvLines" |
| GridLines="None" OnItemEvent="gridInvLines_ItemEvent" OnItemCommand="gridInvLines_ItemCommand" OnItemDataBound="gridInvLines_ItemDataBound" ShowFooter="True"> |
| <ClientSettings > |
| <ClientEvents OnKeyPress="disableEnterKey" OnCommand="OnGridCommand" OnPopUpShowing="PopUpShowing" /> |
| </ClientSettings> |
| <MasterTableView DataKeyNames="LINE_NUMBER" DataSourceID="odsInvLines" EditMode="PopUp" InsertItemDisplay="Top" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New Line"> |
| </telerik:RadGrid> |
function gridRequestStart(grid, eventArgs)
{
if((eventArgs.EventTarget.indexOf("exportButton") != -1))
{
eventArgs.EnableAjax =
false;
ExportGrid()
}
}
function ExportGrid()
{
var masterTable = $find("<%=grdPO.ClientID %>").get_masterTableView();
masterTable.exportToExcel();
}
Can you provide any ideas on how to use my page_load functions to set the grid layout once this script has executed ?
Many Thanks
Mark
| Dim nameCell As TableCell = dataItem("Name") |
| If nameCell.Text = strLastPlayer Then |
| nameCell.ForeColor = Drawing.Color.Red |
| End If |
| strLastPlayer = nameCell.Text |
| If e.Item.ItemIndex > 0 Then |
| Dim intPrev As Integer = e.Item.ItemIndex - 1 |
| Dim prevItem As GridDataItem = RadGrid1.Items(intPrev) |
| Dim nameCell As TableCell = dataItem("Name") |
| Dim prevNameCell As TableCell = prevItem("Name") |
| If nameCell.Text = prevNameCell.Text Then |
| nameCell.ForeColor = Drawing.Color.Red |
| End If |
| 'strLastPlayer = nameCell.Text |
| End If |

Telerik.Web.UI.RadScheduler.SwitchToAdvancedMode() +202
Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +582
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 "
But if I use the default template for the inline insert then click "options" it will show my custom advanced template.
Seems like i am missing something, so i would appreciate any help.
Here is my code for the schedule control:
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" |
| AutoGenerateColumns="False" DataSourceID="logsDataSource" GridLines="None" |
| Skin="Office2007" Width="100%"> |
| <HeaderContextMenu Skin="Office2007"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </HeaderContextMenu> |
| <MasterTableView DataSourceID="logsDataSource" Width="100%" > |
| <Columns> |
| <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="idColumn" /> |
| <telerik:GridDateTimeColumn DataField="Date" HeaderText="Date" UniqueName="dateColumn" /> |
| <telerik:GridBoundColumn DataField="Thread" HeaderText="Thread" UniqueName="threadColumn" /> |
| <telerik:GridBoundColumn DataField="Level" HeaderText="Level" UniqueName="levelColumn" /> |
| <telerik:GridBoundColumn DataField="Logger" HeaderText="Logger" UniqueName="loggerColumn" /> |
| <telerik:GridBoundColumn DataField="Message" HeaderText="Message" UniqueName="messageColumn" /> |
| <telerik:GridBoundColumn DataField="Exception" HeaderText="Exception" UniqueName="exceptionColumn" /> |
| </Columns> |
| <PagerStyle Position="TopAndBottom" /> |
| </MasterTableView> |
| <FilterMenu Skin="Office2007"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </FilterMenu> |
| </telerik:RadGrid> |