Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
191 views
Hello,

How can i set the mindate on my datepicker to 6 months from today or current date?

Thank you
Daniel
Telerik team
 answered on 12 Jan 2009
5 answers
309 views
I have a selection for an event history and when I make the selection and hit the search button the radgrid posts but when I hit next page button the radgrid disappears then when I hit the search button again the second page appears.  I tried to add the radgrid to an update panel but it still does the same thing.  Do I have something not set right?  I added an ajaxmanager too but there is already one on the master default page.  Thanks in advance.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucEventHistory.ascx.cs" 
    Inherits="uc_mas_ucEventHistory" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 
<style type="text/css">  
    .style1  
    {  
        width: 114px;  
    }  
</style> 
Data from mastermind here, rules need to be defined by <b>BUSINESS</b> 
<div id="EventHistoryContainer">  
    <asp:Table runat="server" ID="Eventhistorytable" Width="593px" Style="vertical-align: top">  
        <asp:TableRow> 
            <asp:TableCell ColumnSpan="4" HorizontalAlign="center" Style="border-bottom-style: double;  
                border-bottom-width: thin; border-bottom-color: Navy"> 
                <h3> 
                    <asp:Label ID="LabelTitle" runat="server">Event history Selection</asp:Label></h3>  
            </asp:TableCell> 
        </asp:TableRow> 
        <asp:TableRow Style="vertical-align: top; height: 25px;" VerticalAlign="top">  
            <asp:TableCell CssClass="style1">  
                <asp:Label ID="Label1" runat="server" Text="Start Date :"></asp:Label></asp:TableCell> 
            <asp:TableCell> 
                <telerik:RadDatePicker ID="RadDatePicker1" runat="server" Skin="Office2007" Culture="English (United States)" 
                    ValidationGroup="1" CausesValidation="True" DateInput-CausesValidation="True">  
                    <DateInput ID="DateInput1" LabelCssClass="radLabelCss_Office2007" Skin="Office2007" 
                        runat="server" CausesValidation="True">  
                    </DateInput> 
                    <Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                        ViewSelectorText="x" Skin="Office2007" runat="server">  
                    </Calendar> 
                    <DatePopupButton runat="server"></DatePopupButton> 
                </telerik:RadDatePicker> 
            </asp:TableCell> 
            <asp:TableCell> 
                <asp:Label ID="Label2" runat="server" Text="Start Time :"></asp:Label></asp:TableCell> 
            <asp:TableCell> 
                &nbsp;  
                <telerik:RadTimePicker ID="RadTimePicker1" runat="server" Culture="English (United States)" 
                    Skin="Office2007" ValidationGroup="1" CausesValidation="True" DateInput-CausesValidation="True" 
                    DateInput-ValidationGroup="1">  
                    <Calendar runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                        ViewSelectorText="x">  
                    </Calendar> 
                    <DatePopupButton Visible="False" CssClass="" ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                    <TimeView runat="server" CellSpacing="-1">  
                    </TimeView> 
                    <TimePopupButton runat="server" CssClass="" ImageUrl="" HoverImageUrl=""></TimePopupButton> 
                    <DateInput runat="server" Width="" LabelCssClass="" CausesValidation="True" ValidationGroup="1">  
                    </DateInput> 
                </telerik:RadTimePicker> 
            </asp:TableCell> 
        </asp:TableRow> 
        <asp:TableRow> 
            <asp:TableCell CssClass="style1">  
                <asp:Label ID="Label3" runat="server" Text="End Date :"></asp:Label></asp:TableCell> 
            <asp:TableCell> 
                <telerik:RadDatePicker ID="RadDatePicker2" runat="server" Skin="Office2007" Culture="English (United States)" 
                    ValidationGroup="1" CausesValidation="True" DateInput-CausesValidation="True" 
                    DateInput-ValidationGroup="1">  
                    <DateInput ID="DateInput2" LabelCssClass="radLabelCss_Office2007" Skin="Office2007" 
                        runat="server">  
                    </DateInput> 
                    <Calendar ID="Calendar2" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                        ViewSelectorText="x" Skin="Office2007" runat="server">  
                    </Calendar> 
                    <DatePopupButton runat="server"></DatePopupButton> 
                </telerik:RadDatePicker> 
            </asp:TableCell> 
            <asp:TableCell> 
                <asp:Label ID="Label4" runat="server" Text="End Time :"></asp:Label></asp:TableCell> 
            <asp:TableCell> 
                &nbsp;  
                <telerik:RadTimePicker ID="RadTimePicker2" runat="server" Culture="English (United States)" 
                    Skin="Office2007" ValidationGroup="1" CausesValidation="True" DateInput-CausesValidation="True" 
                    DateInput-ValidationGroup="1">  
                    <Calendar runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                        ViewSelectorText="x">  
                    </Calendar> 
                    <DatePopupButton Visible="False" CssClass="" ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                    <TimeView runat="server" CellSpacing="-1">  
                    </TimeView> 
                    <TimePopupButton runat="server" CssClass="" ImageUrl="" HoverImageUrl=""></TimePopupButton> 
                    <DateInput runat="server" Width="" LabelCssClass="" CausesValidation="True" ValidationGroup="1">  
                    </DateInput> 
                </telerik:RadTimePicker> 
            </asp:TableCell> 
        </asp:TableRow> 
        <asp:TableRow VerticalAlign="top">  
            <asp:TableCell> 
                <asp:Label runat="server" ID="lblMaxEvents" Text="Max Events to Return: "></asp:Label></asp:TableCell> 
            <asp:TableCell> 
                <telerik:RadComboBox ID="rdcMaxEvents" runat="server" ValidationGroup="1" CausesValidation="True">  
                    <Items> 
                        <telerik:RadComboBoxItem runat="server" Selected="True" Text="make a selection" Value="(none)" /> 
                        <telerik:RadComboBoxItem runat="server" Text="10" Value="10" /> 
                        <telerik:RadComboBoxItem runat="server" Text="20" Value="20" /> 
                        <telerik:RadComboBoxItem runat="server" Text="50" Value="50" /> 
                        <telerik:RadComboBoxItem runat="server" Text="100" Value="100" /> 
                        <telerik:RadComboBoxItem runat="server" Text="250" Value="250" /> 
                        <telerik:RadComboBoxItem runat="server" Text="500" Value="500" /> 
                        <telerik:RadComboBoxItem runat="server" Text="1000" Value="1000" /> 
                    </Items> 
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </telerik:RadComboBox> 
            </asp:TableCell> 
            <asp:TableCell ColumnSpan="2"</asp:TableCell> 
        </asp:TableRow> 
        <asp:TableRow VerticalAlign="top">  
            <asp:TableCell> 
                <asp:Label runat="server" ID="lblGroupBy" Text="Group By Incident? "></asp:Label></asp:TableCell><asp:TableCell> 
                    <asp:RadioButtonList ID="rblGroupBy" runat="server" RepeatDirection="Horizontal" 
                        RepeatLayout="Flow">  
                        <asp:ListItem>Yes</asp:ListItem> 
                        <asp:ListItem Selected="True">No</asp:ListItem> 
                    </asp:RadioButtonList> 
                </asp:TableCell> 
            <asp:TableCell ColumnSpan="2"> &nbsp;</asp:TableCell> 
        </asp:TableRow> 
        <asp:TableRow VerticalAlign="top">  
            <asp:TableCell> 
                <asp:Label runat="server" ID="lblEntireSite" Text="Entire Site? "></asp:Label></asp:TableCell><asp:TableCell> 
                    <asp:RadioButtonList ID="rblEntireSite" runat="server" RepeatDirection="Horizontal" 
                        RepeatLayout="Flow">  
                        <asp:ListItem>Yes</asp:ListItem> 
                        <asp:ListItem Selected="True">No</asp:ListItem> 
                    </asp:RadioButtonList> 
                </asp:TableCell> 
            <asp:TableCell ColumnSpan="2"> &nbsp;</asp:TableCell> 
        </asp:TableRow> 
        <asp:TableRow VerticalAlign="top">  
            <asp:TableCell> 
                <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" /> 
            </asp:TableCell><asp:TableCell> &nbsp;</asp:TableCell> 
            <asp:TableCell ColumnSpan="2"> &nbsp;</asp:TableCell> 
        </asp:TableRow> 
        <asp:TableRow> 
            <asp:TableCell ColumnSpan="4">  
                <asp:Label runat="server" ID="lblError" Text="" Font-Bold="True" ForeColor="Red"></asp:Label></asp:TableCell> 
        </asp:TableRow> 
    </asp:Table> 
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">  
        <ContentTemplate> 
            <table> 
                <tr> 
                    <td> 
                    
                        <telerik:RadGrid ID="RadGrid2" runat="server" Visible="True" Skin="Vista" AllowPaging="True" 
                            AutoGenerateColumns="False" AllowFilteringByColumn="True" PageSize="5" BorderColor="Black" 
                            BorderStyle="Solid" OnPageIndexChanged="RadGrid2_PageIndexChanged">  
                            <HeaderContextMenu EnableTheming="True" Skin="Vista">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </HeaderContextMenu> 
                            <MasterTableView> 
                                <RowIndicatorColumn> 
                                    <HeaderStyle Width="20px" /> 
                                </RowIndicatorColumn> 
                                <ExpandCollapseColumn> 
                                    <HeaderStyle Width="20px" /> 
                                </ExpandCollapseColumn> 
                                <Columns> 
                                    <telerik:GridBoundColumn HeaderText="additional_info" UniqueName="additional_info" 
                                        DataField="additional_info">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn HeaderText="alarminc_no" UniqueName="alarminc_no" DataField="alarminc_no">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn HeaderText="event_date" UniqueName="event_date" DataField="event_date">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn HeaderText="event_id" UniqueName="event_id" DataField="event_id">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn HeaderText="phone" UniqueName="phone" DataField="phone">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn HeaderText="system_no" UniqueName="system_no" DataField="system_no">  
                                    </telerik:GridBoundColumn> 
                                </Columns> 
                            </MasterTableView> 
                            <ClientSettings> 
                                <Selecting AllowRowSelect="True" /> 
                            </ClientSettings> 
                            <FilterMenu EnableTheming="True" Skin="Vista">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </FilterMenu> 
                        </telerik:RadGrid> 
                    </td> 
                </tr> 
            </table> 
        </ContentTemplate> 
    </asp:UpdatePanel> 
</div> 
Jon-Jon Kershaw
Top achievements
Rank 2
 answered on 12 Jan 2009
2 answers
99 views
In follw up to this thread http://www.telerik.com/community/forums/aspnet-ajax/grid/paging-postback-problems.aspx

now when i make a filter change it does the same post back problem.  I fixed the first paging problem by rebinding on the onpageindexchanged but what about one for filter change?  is there a event for that?
Jon-Jon Kershaw
Top achievements
Rank 2
 answered on 12 Jan 2009
1 answer
127 views
I am using the latest and greatest from Telerik.

I have a Hierarchial RadGrid on a form that does not seem to snap into Insert mode.  I can click the Edit link and it shows my MasterEditTemplate form with my controls and everything works fine.  I have built a few projects so far where the grids using this model insert, update and delete records just fine.  The structure uses the NeedsDataSource and OnDetailTableDataBind event to supply the data to the grids and the ItemCommand event handler to act on.  Which is a typical pattern.

For some reason now the grid does not show the MasterEditTemplate in Insert mode when I click the factory "Add new Record" link on the top of the grid after setting the CommandItemDisplay to "Top" the page just refreshes in the normal browse mode.

As mentioned the insert was working, for some reason now I cannot get the grid to show the grid in Insert mode even though I can step into the ItemCommand handler and verify that the grid is firing the event with the RadGrid.InitInsertCommandName constant yet the page refreshes in browse mode.

Can anyone offer any suggestions?
Reid
Top achievements
Rank 2
 answered on 12 Jan 2009
1 answer
180 views
I am using the latest and greatest from Telerik.

I have a Hierarchial RadGrid on a form that does not seem to snap into Insert mode.  I can click the Edit link and it shows my MasterEditTemplate form with my controls and everything works fine.  I have built a few projects so far where the grids using this model insert, update and delete records just fine.  The structure uses the NeedsDataSource and OnDetailTableDataBind event to supply the data to the grids and the ItemCommand event handler to act on.  Which is a typical pattern.

For some reason now the grid does not show the MasterEditTemplate in Insert mode when I click the factory "Add new Record" link on the top of the grid after setting the CommandItemDisplay to "Top" the page just refreshes in the normal browse mode.

As mentioned the insert was working, for some reason now I cannot get the grid to show the grid in Insert mode even though I can step into the ItemCommand handler and verify that the grid is firing the event with the RadGrid.InitInsertCommandName constant yet the page refreshes in browse mode.

Can anyone offer any suggestions?
Reid
Top achievements
Rank 2
 answered on 12 Jan 2009
2 answers
135 views
Hi,

I've tried using the RadSplitter with both VisibleDuringInit=True and VisibleDuringInit=False and neither one are producing acceptable results.

As an example, one of our pages has a left pane for navigation and a right pane for different content. The content I'll use as an example is a Telerik grid with 10 rows and 6 columns, sized to be 100% width of its container. When VisibleDuringInit=True the grid first appears as "collapsed as possible" and then redraws itself to 100% width. It's very flashy and ugly. Clicking different content in the navigation pane repeats this flashy behavior over and over.

I know the above is the point of having the VisibleDuringInit property; however, when I set VisibleDuringInit to True each navigation click results in a mostly blank screen 2 seconds (almost 3 seconds sometimes) before displaying everything. This is not acceptable either. It makes our application appear very slow.

Is there anything I can try? We would really like to use the split in many places in our application but neither of the above are acceptable to us.

Thank you,
Terry



terrysmith
Top achievements
Rank 1
 answered on 12 Jan 2009
1 answer
90 views
Hi i have 2 grids and a menu

what i'm trying todo is get the e.HtmlElement but on the ClientSide i can get it but on the Server Side it's undeifned

all the code is on one page including JS i have looked and looked but i get Undefined when i drag onto the Menu and "" when i drag onto the RadGrid but i get it in the Clientside

Please Help can provide code if need be
Daniel
Telerik team
 answered on 12 Jan 2009
5 answers
187 views
Hello, i tried the new FormDecorator in a MultiPageView and the style is not well apply on buttons inside tabs.

I have a page that contains this code:

 <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="WebBlue" DecoratedControls="All" /> 
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
      
    <telerik:RadTabStrip ID="tsTableBudget" runat="server" Skin="WebBlue" MultiPageID="mpBudget" 
        Width="100%">  
        <Tabs> 
            <telerik:RadTab Text="Tab1" PageViewID="Tab1" /> 
            <telerik:RadTab Text="Tab2" PageViewID="Tab2" /> 
        </Tabs> 
    </telerik:RadTabStrip> 
    <telerik:RadMultiPage ID="mpBudget" runat="server">  
        <telerik:RadPageView ID="Tab1" runat="server" Width="100%">  
            <telerik:RadAjaxPanel ID="AjaxPanelSuivi" runat="server">  
                <asp:Button ID="Button1" runat="server" Text="Button1 Style not well apply" /> 
            </telerik:RadAjaxPanel> 
        </telerik:RadPageView> 
        <telerik:RadPageView ID="RadPageView1" runat="server" Width="100%">  
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" > 
                <asp:Button ID="Button3" runat="server" Text="Button2 Style not well apply" /> 
            </telerik:RadAjaxPanel> 
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 
    <asp:Button ID="Button2" runat="server" Text="Button rendered ok" /> 

and on Button2 the style is corect but not in Button1 or Button3.

Did I do something wrong?

Thanks for your help

Cedric
Georgi Tunev
Telerik team
 answered on 12 Jan 2009
9 answers
220 views
It seems it should be straight foward.  I have a model popup from the ControlToolkit on the page.  In the modal there is a server control for a submit button which does a post back, but I have the RadAjaxManagerProxy capturing it and updating only one specific panel (which happens to also contain the buttons that open the model).  

Seems after the first click the modal works great, but after the ajax post back, the buttons do not initiate the modal popup even anymore.

As anyone seen anything like this? Where the modal only works the first time?

Here's my Proxy
 <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" > 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="btnConfirmYes"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="pnlDocumentInfo" LoadingPanelID="AjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
 </telerik:RadAjaxManagerProxy> 

Here's the Model
    <cc1:ModalPopupExtender  
        ID="mpeDocumentInfoLinkButton"  
        runat="server"  
        PopupControlID="pnlEditDocumentInfo"  
        TargetControlID="lbEditDocInfo"  
        OkControlID="btnConfirmYes"  
        BackgroundCssClass="modalBackground" 
        CancelControlID="btnCancel" />                 


Here's the Panel for the modal
<asp:Panel  
                                ID="pnlEditDocumentInfo"  
                                runat="server"  
                                HorizontalAlign="Left"  
                                CssClass="modalPopup"  
                                style="display:none;"
                                <table> 
                                    <tr> 
                                        <td> 
                                            <asp:Label ID="lblDocumentName" runat="server" Text="Version Identifer Name:" Font-Bold="true" /><br /> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td> 
                                            <asp:TextBox ID="tbxDocumentName" runat="server" Width="200px" /> 
                                            <asp:RequiredFieldValidator ID="rfvDocumentName" runat="server"  
                                                ErrorMessage="Required!" 
                                                ControlToValidate="tbxDocumentName" /> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td> 
                                            <strong>Document Revision Date</strong><br /> 
                                            MM/DD/YYYY<br /> 
                                            <telerik:RadDatePicker ID="rdpRevisionDate" runat="server" Skin="Office2007" /><br /> 
                                            <br /> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td> 
                                            <asp:Button ID="btnConfirmYes" runat="server" Text="Save" Width="75px"  />&nbsp;&nbsp;<asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="75px" /> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </asp:Panel> 

And here's the panel that gets updated via the proxy
<asp:Panel ID="pnlDocumentInfo" runat="server"
                            <table id="tblDocumentInfo" width="100%" border="0"
                                <tr> 
                                    <td> 
                                        Title: <asp:Label ID="lblDocName" runat="server" /> 
                                    </td> 
                                    <td align="right"
                                        <asp:ImageButton runat="server" ID="ibDocInfo" AlternateText="Edit Document Information" ImageUrl="~/images/btn_edit.gif" /><asp:LinkButton ID="lbEditDocInfo" runat="server" Text="Edit" /> 
                                    </td> 
                                </tr> 
</table></panel


Fred
Top achievements
Rank 1
 answered on 12 Jan 2009
1 answer
182 views
I get this JS error when I call getCellByColumnUniqueName:
_242 is null 
getCellByColumnUniqueName()(null"iPackageId")ScriptRe...220000000 (line 3399) 
getDataItemKeyValue(Object, null)Default.aspx (line 235) 
RowSelected(Object, Object)Default.aspx (line 229) 
_handler()(Object, Object)ScriptRe...594496661 (line 2503) 
raiseEvent()("rowSelected", Object)ScriptRe...220000000 (line 794) 
(?)()()ScriptRe...220000000 (line 6551) 
_selectRowInternal()(tr#ctl00_ctl00_baseContentPlaceHolder1_cpContentArea_~/Configurations/RecordingConfiguration/TabControls/TabPackageSelection.ascxuserControl_RadGrid1_ctl00__1.GridAltRow_Vista, Object rawEvent=Event click altKey=false button=0, falsefalsetruetrue)ScriptRe...220000000 (line 2578) 
_click()(Object rawEvent=Event click altKey=false button=0)ScriptRe...220000000 (line 2485) 
(?)()()ScriptRe...594496661 (line 50) 
browserHandler()(click clientX=231, clientY=223)ScriptRe...594496661 (line 3034) 
[Break on this error] return _242.get_element().cells[i]; 

this is my page and grid:
<asp:Label runat="server" ID="RESX_lblChooseTelephonyEnviroment" meta:resourcekey="RESX_lblChooseTelephonyEnviroment"></asp:Label> 
<br /> 
<br /> 
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="PackagesDataSource" GridLines="None" 
    Skin="Vista" Width="100%" BorderWidth="0px" ShowHeader="False" AllowAutomaticDeletes="True" 
    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowMultiRowEdit="false" 
    AllowMultiRowSelection="false"
    <HeaderContextMenu EnableTheming="True"
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </HeaderContextMenu> 
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="TopAndBottom" DataKeyNames="iPackageId" 
        DataSourceID="PackagesDataSource" EditMode="InPlace"
        <CommandItemTemplate> 
            <div style="padding: 0 5px;"
                <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" CausesValidation="false" 
                    Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="./Img/Cancel.gif" />Cancel</asp:LinkButton>&nbsp;&nbsp; 
                <asp:LinkButton ID="Add" runat="server" CommandName="InitInsert" CausesValidation="false" 
                    Enabled='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="/Img/AddRecord.gif" />Add Telephony Enviroment</asp:LinkButton>&nbsp;&nbsp; 
                <asp:LinkButton ID="LinkButton1" CausesValidation="false" OnClientClick="javascript:return confirm('Delete Selected package?')" 
                    runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="/Img/Delete.gif" />Delete</asp:LinkButton>&nbsp;&nbsp; 
                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" CommandName="PerformInsert" 
                    Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'>Add this Customer</asp:LinkButton>&nbsp;&nbsp; 
            </div> 
        </CommandItemTemplate> 
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="iPackageId" DataType="System.Int32" HeaderText="iPackageId" 
                ReadOnly="True" SortExpression="iPackageId" UniqueName="iPackageId" Display="false" 
                ForceExtractValue="None"
            </telerik:GridBoundColumn> 
            <telerik:GridDropDownColumn DataSourceID="PackageTypesDataSource" SortExpression="iPackageType" 
                UniqueName="" DataField="iPackageType" meta:resourcekey="RESX_iPackageType" ListValueField="iPackageTypeID" 
                ListTextField="nvcPackageName" DropDownControlType="RadComboBox"
            </telerik:GridDropDownColumn> 
            <telerik:GridBoundColumn DataField="nvcPackageName" HeaderText="nvcPackageName" SortExpression="nvcPackageName" 
                UniqueName="nvcPackageName" Display="true" meta:resourcekey="RESX_nvcPackageName"
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="iSwitchID" DataType="System.Int32" HeaderText="iSwitchID" 
                SortExpression="iSwitchID" UniqueName="iSwitchID" Display="false"
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="iWizardStep" DataType="System.Int32" HeaderText="iWizardStep" 
                SortExpression="iWizardStep" UniqueName="iWizardStep" Display="false"
            </telerik:GridBoundColumn> 
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
            </telerik:GridButtonColumn> 
        </Columns> 
        <EditFormSettings CaptionDataField="iCaptureId"
            <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle> 
            <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle> 
            <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle> 
            <EditColumn ButtonType="ImageButton" /> 
        </EditFormSettings> 
    </MasterTableView> 
    <SelectedItemStyle BorderWidth="1px" Font-Bold="True" Wrap="True" /> 
    <ClientSettings> 
        <ClientEvents OnRowSelected="RowSelected" /> 
        <Selecting AllowRowSelect="True" /> 
    </ClientSettings> 
    <FilterMenu EnableTheming="True"
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </FilterMenu> 
</telerik:RadGrid> 
<asp:ObjectDataSource ID="PackagesDataSource" runat="server" DeleteMethod="Delete" 
    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="Fill" 
    TypeName="NPEWebApplication.Configurations.RecordingConfiguration.CustomDataSources.PackageDataSource" 
    UpdateMethod="Update"
    <DeleteParameters> 
        <asp:Parameter Name="iPackageId" Type="String" /> 
        <asp:Parameter Name="original_iPackageId" Type="Int32" /> 
    </DeleteParameters> 
    <UpdateParameters> 
        <asp:Parameter Name="iPackageType" Type="Int32" /> 
        <asp:Parameter Name="nvcPackageName" Type="String" /> 
        <asp:Parameter Name="iSwitchID" Type="Int32" /> 
        <asp:Parameter Name="iWizardStep" Type="Int32" /> 
        <asp:Parameter Name="original_iPackageId" Type="Int32" /> 
    </UpdateParameters> 
    <InsertParameters> 
        <asp:Parameter Name="iPackageId" Type="Int32" /> 
        <asp:Parameter Name="iPackageType" Type="Int32" /> 
        <asp:Parameter Name="nvcPackageName" Type="String" /> 
        <asp:Parameter Name="iSwitchID" Type="Int32" /> 
        <asp:Parameter Name="iWizardStep" Type="Int32" /> 
    </InsertParameters> 
</asp:ObjectDataSource> 
<asp:ObjectDataSource ID="PackageTypesDataSource" runat="server" OldValuesParameterFormatString="original_{0}" 
    SelectMethod="Fill" TypeName="NPEWebApplication.Configurations.RecordingConfiguration.CustomDataSources.PackageTypesDataSource"
</asp:ObjectDataSource> 
<asp:HiddenField runat="server" ID="hdnSelectedIndex" Value="-1" /> 
 
<script language="javascript" type="text/javascript"
    function RowSelected(sender, eventArgs) { 
        var indexField = document.getElementById("<%=hdnSelectedIndex.ClientID %>"); 
        if (indexField) { 
            indexField.value = getDataItemKeyValue(sender, eventArgs.get_gridDataItem()); 
        } 
        alert(indexField.value); 
    } 
    function getDataItemKeyValue(radGrid, item) { 
        alert("hey"); 
        alert(radGrid.get_masterTableView().getCellByColumnUniqueName(item, "iPackageId")); 
        return parseInt(radGrid.get_masterTableView().getCellByColumnUniqueName(item, "iPackageId").innerHTML); 
    } 
</script> 
 
 

Daniel
Telerik team
 answered on 12 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?