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

I have the exact same issue reported over two years ago here - http://www.telerik.com/community/forums/aspnet-mvc/combobox/dropdownlist-does-not-change-its-input-value.aspx

Using the plugin they are also using, I have found changes to dropdowns were not being tracked.  I believe the root of this issue is from this user's post:

"However, using .val() does not fire a change event. In html's select dropdown and not telerik's dropdown, selecting a different value fires a change event. In your case, you change the value via .val() but forget to trigger a change event which I think you should do via $('#').val().change();"

Telerik's reply back in sept 2011 was that this would be forwarded to the developers.  I am not interested in wiring up a valueChanged event handler to every dropdownlist, and was hoping to get an update on this issue.  Shouldn't telerik's dropdown follow the same event pattern as a standard html dropdown in terms of firing events?  If there's a reason it shouldn't, is there any global solution for this issue?


Nencho
Telerik team
 answered on 08 Jan 2014
6 answers
146 views
I have a self-referencing hierarchical grid defined as follows:

<telerik:RadGrid
    ID="grdNotes"
    runat="server"
    OnColumnCreated="grdNotes_ColumnCreated"
    OnItemCreated="grdNotes_ItemCreated"
    OnItemDataBound="grdNotes_ItemDataBound"
    OnNeedDataSource="grdNotes_NeedDataSource"
    OnPreRender="grdNotes_PreRender"
    AutoGenerateColumns="False"
    SkinID="HierarchicalGrid"
    GridLines="None"
    AllowCustomPaging="True"
    ShowStatusBar="True"
    PageSize="20"
    EnableLinqExpressions="False"
    Width="99%" CellSpacing="0">
    <MasterTableView
        HierarchyDefaultExpanded="true"
        HierarchyLoadMode="Client"
        AllowSorting="true"
        DataKeyNames="Id,ParentId,Token,IsRoot,Replies,NoteCreator"
        ClientDataKeyNames="Id,ParentId,Token,IsRoot,Replies,NoteCreator"
        NoDetailRecordsText=""
        EnableNoRecordsTemplate="False"
        TableLayout="Auto"
        Width="100%"
        HorizontalAlign="Right"
        EnableHeaderContextMenu="True">
        <SelfHierarchySettings ParentKeyName="ParentId" KeyName="Id" MaximumDepth="20" />
        <RowIndicatorColumn Visible="False" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
        <Columns>
            <telerik:GridClientSelectColumn DataTextField="Id" HeaderAbbr="Select" HeaderButtonType="TextButton"
                HeaderText="Select" HeaderTooltip="Select/Deselect" Text="Select" Visible="false"
                UniqueName="asgSelect">
            </telerik:GridClientSelectColumn>
            <telerik:GridBoundColumn DataField="Id" SortExpression="Id" UniqueName="Id">
                <HeaderStyle Width="50px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Title" SortExpression="Title" UniqueName="Title"
                HtmlEncode="true">
                <HeaderStyle Width="150px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Body" SortExpression="Body" UniqueName="Body" HtmlEncode="False">
                <HeaderStyle Width="350px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CreatedBy" SortExpression="CreatedBy" UniqueName="CreatedBy">
                <HeaderStyle Width="150px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CreatedDate" SortExpression="CreatedDate" UniqueName="CreatedOn">
                <HeaderStyle Width="150px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ParentId" HeaderText="Parent Id" SortExpression="ParentId"
                UniqueName="ParentId" Visible="false" />
            <telerik:GridBoundColumn DataField="Token" HeaderText="Token" SortExpression="Token"
                UniqueName="Token" Visible="false" />
            <telerik:GridBoundColumn DataField="IsRoot" HeaderText="Is Root" SortExpression="IsRoot"
                UniqueName="IsRoot" Visible="false" />
            <telerik:GridBoundColumn DataField="Replies" HeaderText="Replies" SortExpression="Replies"
                UniqueName="Replies" Visible="false" />
            <telerik:GridBoundColumn DataField="NoteCreator" HeaderText="NoteCreator" SortExpression="NoteCreator"
                UniqueName="NoteCreator" Visible="false" />
            <telerik:GridTemplateColumn UniqueName="Actions" Visible="false">
                <ItemTemplate>
                    <telerik:RadToolBar ID="rtbNoteActions" runat="server" SkinID="ActionToolbar" OnButtonClick="NotesGridToolbarButtonClicked"
                        OnClientButtonClicking="NoteActionToolbarClicking">
                        <Items>
                            <telerik:RadToolBarButton Text="Properties" CommandName="Properties" ImageUrl="~/Images/page_view.gif" />
                            <telerik:RadToolBarButton Text="Reply" CommandName="Reply" ImageUrl="~/Images/page_edit.gif" />
                            <telerik:RadToolBarButton Text="Security" CommandName="Security" ImageUrl="~/Images/shield16.gif" />
                            <telerik:RadToolBarButton Text="Delete" CommandName="Delete" ImageUrl="~/Images/delete16.gif" />
                        </Items>
                    </telerik:RadToolBar>
                </ItemTemplate>
                <HeaderStyle Width="15%"></HeaderStyle>
            </telerik:GridTemplateColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>
        <PagerStyle AlwaysVisible="True"></PagerStyle>
    </MasterTableView>
    <HeaderContextMenu EnableTheming="True">
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </HeaderContextMenu>
    <ExportSettings ExportOnlyData="True" IgnorePaging="True">
    </ExportSettings>
    <ClientSettings
        Selecting-AllowRowSelect="true"
        Resizing-AllowColumnResize="true"
        AllowColumnsReorder="true">
        <Selecting AllowRowSelect="True"></Selecting>
        <ClientEvents
            OnRowSelected="NoteRowSelected"
            OnRowContextMenu="NoteContextMenu"
            OnRowDblClick="grdNotes_OnRowDblClick"
            OnGridCreated="NotePageLoad"
            OnTableCreated="ResizeAllNoteColumns"
            OnColumnResized="ResizeAllNoteColumns"
            OnColumnHiding="HideDetailColumn"
            OnColumnShowing="ShowDetailColumn" />
    </ClientSettings>
    <PagerStyle Position="Bottom" AlwaysVisible="True" Mode="NextPrevAndNumeric" Wrap="False"
        BackColor="White" Font-Size="Large" />
</telerik:RadGrid>


Each item can have 0 or more children.  When I reorder the columns, the root level entries (indicated as "Parent Col Val" below) are reordered, but the child column values (e.g., "Child Col Val") remain in the order in the grid defintion.  For example, if I have the initial layout defined as:

Col A        | Col B        | Col C
Parent A Val | Parent B Val | Parent C Val
Child A Val  | Child B Val  | Child C Val
Child A Val  | Child B Val  | Child C Val
Parent A Val | Parent B Val | Parent C Val

I then reorder the columns.  While the parent values reorder properly, the child ones do not.

Col B        | Col A        | Col C
Parent B Val | Parent A Val | Parent C Val
Child A Val  | Child B Val  | Child C Val
Child A Val  | Child B Val  | Child C Val
Parent B Val | Parent A Val | Parent C Val

This also occurs when I the saved grid settings are reloaded during Page_init (e.g., the parent items are ordered in the saved order, but the child columns are ordered as they're defined).  Attached are screenshots showing the grid before and after the columns are reordered to better describe the behavior I'm experiencing.

Is this a bug w/ the grid?  I would expect that self-referencing grids would automatically reorder the child tables as well.  If this isn't a bug, what is required in order for the columns to be ordered properly?
Matt
Top achievements
Rank 1
 answered on 08 Jan 2014
3 answers
314 views
Hi,
I have a 2 Level(Parent & Child) Treeview.
and i set Parent Node ExpandMode = TreeNodeExpandMode.ServerSide;

How do we set Checked=true if user has previously selected Child nodes (lets assume i am getting the previous selected values from the Database)


Thank you
Plamen
Telerik team
 answered on 08 Jan 2014
1 answer
109 views

Followup: Found this:

http://www.telerik.com/help/aspnet-ajax/treeview-data-binding-hierarchical.html



which answered my question, and was able to resolve my issue.



Sometimes, admittedly, I am not the brightest bulb on the planet, but for the life of me I just can't seem to get what I think is a rather simple TreeView to work.


I have data from an SQL data source which is broken down into categories, i.e.







ID              Text                    ParentId
-----------------------------------------------------------
Header                                  Header
Preamble                                Preamble
Clauses                                 Clauses
            Administrative Fees     Clauses
            Prompt Delivery         Clauses
Signature Block                         Signature Block
Appendix                                Appendix
Exhibit                                 Exhibit








Basically, I want this to appear in a tree view with the "Id" Text being the primary (expandable) node (i.e. Clauses), and the "text" being the secondary node which will appear when the user expands the primary node.







I've fiddled around w/ the various online examples, but either I get an error telling me "These columns don't currently have unique values" (if I leave the ParentId column blank when the Text column is blank) or I get nothing at all. I've tried duplicating the online example:







<telerik:RadTreeView runat="server" ID="RadTreeView1" DataSourceID="SqlDataSource1"
DataFieldID="id" DataFieldParentID="parentID" Skin="Vista" CheckBoxes="true">
    <DataBindings>
        <telerik:RadTreeNodeBinding TextField="Text" />
        <telerik:RadTreeNodeBinding
            Depth="0"
            Checkable="false"
            TextField="Text"
            Expanded="true"
            CssClass="rootNode"
        />
    </DataBindings>
</telerik:RadTreeView>








but without "seeing" the underlying data, I'm not sure how to structure my dataset to duplicate this functionality.







Can someone provide a simple example of the proper TreeView syntax?











Dimitar
Telerik team
 answered on 08 Jan 2014
4 answers
182 views
Trying to export my sub grid as well but it seems to not work, following the instructions found on teleriks sites but to no avail.

Mu grid is wrapped in update panel and it works to export the main grid just fine just no sub grids come along.  Here is the code I put in to take care of the issue but nothing.  I am using all the radgrid advanced data binding methods.

<CommandItemTemplate>
           <asp:Button ID="btnExport" runat="server" CommandName="ExportToExcel" Text="Export Excel" />
</CommandItemTemplate>
 
  Protected Sub myRadGrid_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles myRadGrid.ItemCommand
        If e.CommandName = "ExportToExcel" Then
            For Each item As GridItem In myRadGrid.MasterTableView.Items
                item.Expanded = True
            Next
            isExport = True
        End If
    End Sub
 
 
 Protected Sub myRadGrid_ItemCreated(sender As Object, e As GridItemEventArgs) Handles myRadGrid.ItemCreated
        If Not isExport Then
            If TypeOf e.Item Is GridCommandItem Then
                ScriptManager.GetCurrent(Page).RegisterPostBackControl(e.Item.FindControl("btnExport"))
            End If
        End If
    End Sub


Kevin
Top achievements
Rank 1
 answered on 08 Jan 2014
4 answers
84 views
Hi,
I would like to set 'Auto' width of grid.. because my Page contains left sidebar with hide and show functionality and I have grid with 15 columns.
When I bind the data to grid with '100%' width, it goes outside of design and If I set specific width to grid then it not display properly b'coz of the side bar hide and show functionality.
If same grid contain less column then it works properly..so please give me proper solution.
thank you.
Galin
Telerik team
 answered on 08 Jan 2014
1 answer
108 views
Hi - 
I'm looking for suggestions on how to best achieve the following using the AsyncUpload control.

Our users are uploading excel files. I need to verify there are certain columns in the excel file. If they are all present, then it will pull data from the spreadsheet and put that into a database. Then the file itself will be put into the database.

At what point should I do the verification for the columns? Can I do this error checking on the temporary file?  There is no reason for the excel file to ever make it into the database if the columns are not present and the data cannot be uploaded if it isn't.

Thank you in advance.
Plamen
Telerik team
 answered on 08 Jan 2014
1 answer
105 views
Hi,

I am creating a new dashboard page with RadTabstrips and each tabs loading an individual set of Raddocks dynamically (these docks are movable and thier state are saved in the DB).
The issue we are facing while trying to achieve this is since we are loading the Docks dynamically and maintainig its state through docklayout's loadstate and savestate method, we are suppose to add the dock back in Page_Init event.
Also we can get the required dock details from DB based on current selected Tab only but we cannot get the selected tab index in Page_Init. If we get the selected index in page_load and add docks there then the state of the dock is not retained.

Please suggest us a solution here, following are some of the code samples;
Dashboard.aspx:

<telerik:RadTabStrip runat="server" ID="RadTabStrip1" class="Dashboard" Orientation="HorizontalTop" EnableDragToReorder="true" OnTabClick="RadTabStrip1_TabClick" Skin="Outlook" OnReordered="RadTabStrip1_Reordered" MultiPageID="RadMultiPage1" OnClientTabSelecting="onClientTabSelecting" SelectedIndex="0">
                            </telerik:RadTabStrip>
                
       
        <telerik:RadMultiPage class="Dashboard" ID="RadMultiPage1" runat="server" Width="100%" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated">
            <telerik:RadPageView ID="RadPageView1" runat="server">
                <asp:Panel ID="Panel1" runat="server" BorderStyle="None" Width="100%">
                    <telerik:RadDockLayout runat="server" ID="RadDockLayout1"  OnSaveDockLayout="SaveDockLayout1_LoadDockLayout" StoreLayoutInViewState="true">
                        <telerik:RadDockZone runat="server" ID="LeftZone" BorderStyle="Solid" BorderWidth="0px" BorderColor="White" Width="25%" MinHeight="450px" Style="float: left; margin-right: 1px" Height="100%" Skin="Windows7">
                       
                         
                        </telerik:RadDockZone>
                        <telerik:RadDockZone runat="server" ID="MiddleZone" BorderStyle="Solid" BorderWidth="0px" BorderColor="Gray" Width="47%" MinHeight="450px" Style="float: left; margin-right: 1px" Height="100%" Skin="Windows7">
                       
                        </telerik:RadDockZone>
                        <telerik:RadDockZone runat="server" ID="RightZone" BorderStyle="Solid" BorderWidth="0px" BorderColor="White" Width="25%" MinHeight="450px" Style="float: left; margin-right: 1px" Height="100%" Skin="Windows7">
                        </telerik:RadDockZone>
                        <br style="clear: both;" />
                    </telerik:RadDockLayout>
                </asp:Panel>
            </telerik:RadPageView>
        </telerik:RadMultiPage>

Dashboard.aspx.cs:

protected

 

 

void Page_Init(object sender, EventArgs e)

 

{

RadDockLayout1.LoadDockLayout+=

 

new DockLayoutEventHandler(RadDockLayout1_LoadDockLayout);

 

AddDocksByPosition(0);

 


}

private void AddDefaultDocks(int position)

 

{

/*** Get list of docks from DB and load it to the Docklayout****/
}

protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)

 

{

 

System.Web.Script.Serialization.

 

JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();

 

 

 

string serializedList = DockPostionstr;

 

 

 

if (!string.IsNullOrEmpty(serializedList))

 

{

 

 

string[] states = serializedList.Split('|');

 

 

 

foreach (string stringState in states)

 

{

 

 

if (stringState != string.Empty)

 

{

 

 

DockState state = serializer.Deserialize<DockState>(stringState);

 

e.Positions[state.UniqueName] = state.DockZoneID;

e.Indices[state.UniqueName] = state.Index;

}

}

}

}


 

 

 

protected void SaveDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)

 

{

 

 

string dockState;

 

System.Web.Script.Serialization.

 

JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();

 

 

 

List<DockState> stateList = RadDockLayout1.GetRegisteredDocksState();

 

 

 

StringBuilder serializedList = new StringBuilder();

 

 

 

int i = 0;

 

 

 

while (i < stateList.Count)

 

{

serializedList.Append(serializer.Serialize(stateList[i]));

serializedList.Append(

 

"|");

 

i++;

}

dockState = serializedList.ToString();

/***** DB call to save Dashboard state per Tab******/
}

Slav
Telerik team
 answered on 08 Jan 2014
12 answers
135 views
Hello,

Edtior adds 3  br in chrome (doesn't happen on IE).

I am doing the following scenario:

<table id="tbl" border="1">        
            <tr><td></td><td></td></tr>
            <tr><td></td><td></td></tr>
            <tr><td></td><td></td></tr>      
</table>


 <div id="editorTextFile">
        <telerik:RadEditor ID="RadEditor1" runat="server" width="100%" Height="100%" ></telerik:RadEditor>
 </div>
<script type="text/javascript">
         $telerik.$(function () {
             $telerik.$("#tbl tr td").click(function () {
                 var editor = $find("<%=RadEditor1.ClientID%>");
                 var content = $(this).html(); //copy cell info
                 $(this).html(""); //clear cell
                 editor.set_html(content); //copy cell info
                 $telerik.$(this).append($telerik.$("#editorTextFile"));
                 $find("<%= RadEditor1.ClientID %>").onParentNodeChanged();
             });
         });

</script>

After clicking on one of the cells in the table, 3 br were added to the editor.

I am working on telerik version: 2013.2.717.40.

*I checked the same scenario on old telerik version: 2010.1.415.20 and it worked fine.

Thanks,
ido nahmias
Top achievements
Rank 1
 answered on 08 Jan 2014
1 answer
132 views
I have a radgrid with various ddl and radcalendars in the cells within the rows that are all editible.  What I would like to do is be able to loop through and update all editable cells within the rows of myradgrid at the same time.  I have found numerous articles on batch editing when in edit view but I would like to upadate in user view.

Below is my code.

Thanks,

Chad

 

 

<asp:Panel ID="pnlGrid" runat="server" CssClass="panelGrid">

 

 

 

<telerik:RadGrid ID="myRadGrid" runat="server" Width="90%" Skin="Web20" CssClass="dvGridWrapper" AllowSorting="true">

 

 

 

<PagerStyle AlwaysVisible="true" />

 

 

 

<MasterTableView AutoGenerateColumns="false" Font-Size="10" DataKeyNames="intRecruitId" CommandItemDisplay="Bottom">

 

 

 

<CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />

 

 

 

<HeaderStyle ForeColor="White" Font-Bold="true" HorizontalAlign="Center" />

 

 

 

<AlternatingItemStyle BackColor="#B0C4DE" HorizontalAlign="Center" />

 

 

 

<CommandItemTemplate>

 

 

 

<asp:LinkButton ID="lnkUpdateAll" runat="server" CommandName="UpdateAll" CommandArgument='<%#Bind("intRecruitId")%>'>Update All</asp:LinkButton>

 

 

 

</CommandItemTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="dtRSPStatusChanged" HeaderText="Last Changed" />

 

 

 

<telerik:GridTemplateColumn HeaderText="NAME">

 

 

 

<ItemTemplate>

 

 

 

<asp:LinkButton ID="lnkName" runat="server" Text='<%#Bind("Name")%>' CommandArgument='<%#Bind("intRecruitId")%>' CommandName="pnlOpen" ToolTip="Click to See Data"></asp:LinkButton>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="PHASE" UniqueName="Phase">

 

 

 

<ItemTemplate>

 

 

 

<asp:DropDownList ID="ddlPhase3" runat="server" SelectedValue='<%#Bind("intPhaseId")%>'>

 

 

 

<asp:ListItem Value="1" Text="Red" />

 

 

 

<asp:ListItem Value="2" Text="White1" />

 

 

 

<asp:ListItem Value="3" Text="White2" />

 

 

 

<asp:ListItem Value="4" Text="White3" />

 

 

 

<asp:ListItem Value="5" Text="Blue" />

 

 

 

<asp:ListItem Value="6" Text="Green" />

 

 

 

<asp:ListItem Value="7" Text="Gold" />

 

 

 

</asp:DropDownList>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn DataField="dtShip" HeaderText="SHIP DATE">

 

 

 

<ItemTemplate>

 

 

 

<telerik:RadDatePicker ID="rdp_dtShip" runat="server" DbSelectedDate='<%#Bind("dtShip")%>' Width="100px"></telerik:RadDatePicker>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridBoundColumn DataField="ddDate" HeaderText="DROP DEAD DATE" />

 

 

 

<telerik:GridTemplateColumn DataField="dtProjReturn" HeaderText="EST RETURN DATE">

 

 

 

<ItemTemplate>

 

 

 

<telerik:RadDatePicker ID="rdp_Return" runat="server" DbSelectedDate='<%#Bind("dtProjReturn")%>' Width="100px"></telerik:RadDatePicker>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="STATUS" UniqueName="Status">

 

 

 

<ItemTemplate>

 

 

 

<asp:DropDownList ID="ddlStatus3" runat="server" SelectedValue='<%#Bind("intRSPStatusID")%>'>

 

 

 

<asp:ListItem Value="1" Text="Amber" />

 

 

 

<asp:ListItem Value="3" Text="DAT" />

 

 

 

<asp:ListItem Value="4" Text="Discharged" />

 

 

 

<asp:ListItem Value="5" Text="Green" />

 

 

 

<asp:ListItem Value="6" Text="Hardship" />

 

 

 

<asp:ListItem Value="7" Text="Test" />

 

 

 

<asp:ListItem Value="8" Text="OCS" />

 

 

 

<asp:ListItem Value="9" Text="Pend Dis" />

 

 

 

<asp:ListItem Value="10" Text="Prior SVC" />

 

 

 

<asp:ListItem Value="11" Text="Qualified" />

 

 

 

<asp:ListItem Value="12" Text="Red" />

 

 

 

<asp:ListItem Value="13" Text="Shipped" />

 

 

 

<asp:ListItem Value="18" Text="None" />

 

 

 

<asp:ListItem Value="19" Text="NAC" />

 

 

 

<asp:ListItem Value="20" Text="IST" />

 

 

 

<asp:ListItem Value="21" Text="Gold" />

 

 

 

<asp:ListItem Value="22" Text="Not Entered" />

 

 

 

<asp:ListItem Value="23" Text="Recruit Force Pool" />

 

 

 

</asp:DropDownList>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="ISSUE" UniqueName="Issue">

 

 

 

<ItemTemplate>

 

 

 

<asp:DropDownList ID="ddlIssue3" runat="server" SelectedValue='<%#Bind("intRSPIssueID")%>' >

 

 

 

<asp:ListItem Value="1" Text="Admin" />

 

 

 

<asp:ListItem Value="2" Text="APFT" />

 

 

 

<asp:ListItem Value="3" Text="Attendance" />

 

 

 

<asp:ListItem Value="5" Text="BCT" />

 

 

 

<asp:ListItem Value="6" Text="Testing" />

 

 

 

<asp:ListItem Value="7" Text="Test2" />

 

 

 

<asp:ListItem Value="8" Text="Education Fail" />

 

 

 

<asp:ListItem Value="9" Text="Family hardship" />

 

 

 

<asp:ListItem Value="10" Text="Legal" />

 

 

 

<asp:ListItem Value="11" Text="Medical" />

 

 

 

<asp:ListItem Value="12" Text="New Trainee" />

 

 

 

<asp:ListItem Value="13" Text="Packet failure" />

 

 

 

<asp:ListItem Value="14" Text="None" />

 

 

 

<asp:ListItem Value="15" Text="Not Entered" />

 

 

 

<asp:ListItem Value="16" Text="Education HSJR" />

 

 

 

<asp:ListItem Value="17" Text="Education HSSR" />

 

 

 

<asp:ListItem Value="18" Text="Education GED" />

 

 

 

<asp:ListItem Value="19" Text="Pend PH2 Date" />

 

 

 

<asp:ListItem Value="20" Text="Pend IST" />

 

 

 

<asp:ListItem Value="21" Text="College" />

 

 

 

<asp:ListItem Value="22" Text="OCS" />

 

 

 

<asp:ListItem Value="23" Text="ROTC" />

 

 

 

<asp:ListItem Value="24" Text="ROTC SMP" />

 

 

 

<asp:ListItem Value="25" Text="Pend OCS Date" />

 

 

 

<asp:ListItem Value="26" Text="Pend RENO Out" />

 

 

 

<asp:ListItem Value="27" Text="Pending Commission" />

 

 

 

</asp:DropDownList>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="EDUCATION" UniqueName="Ed">

 

 

 

<ItemTemplate>

 

 

 

<asp:DropDownList ID="ddlEd3" runat="server" SelectedValue='<%#Bind("intRSPEdID")%>' >

 

 

 

<asp:ListItem Value="1" Text="N/A" />

 

 

 

<asp:ListItem Value="2" Text="HSSR" />

 

 

 

<asp:ListItem Value="3" Text="HSJR" />

 

 

 

<asp:ListItem Value="4" Text="GED +" />

 

 

 

<asp:ListItem Value="5" Text="GED" />

 

 

 

<asp:ListItem Value="6" Text="GRAD" />

 

 

 

<asp:ListItem Value="7" Text="COLLEGE" />

 

 

 

</asp:DropDownList>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="NOTES">

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Image ID="imgLooker" runat="server" ImageUrl="~/Images/ViewResources.gif" ImageAlign="Middle" BorderStyle="None" />

 

 

 

<asp:PopupControlExtender ID="popInfo" runat="server" PopupControlID="pnlPop" TargetControlID="imgLooker" DynamicContextKey='<% #Eval("intRSPNotesID")%>'

 

 

 

DynamicControlID="pnlpop" DynamicServiceMethod="GetNotes" Position="bottom"></asp:PopupControlExtender>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridBoundColumn DataField="strRSPSiteLocation" HeaderText="RSP SITE" />

 

 

 

<telerik:GridBoundColumn DataField="strUIC" HeaderText="UIC" />

 

 

 

<telerik:GridTemplateColumn HeaderText="UPDATE">

 

 

 

<ItemTemplate>

 

 

 

<asp:LinkButton ID="lnkUpdate" runat="server" Text="Update" ToolTip="Click to Save Data" CommandArgument='<%#Bind("intRecruitId")%>' CommandName="Update"></asp:LinkButton>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

</Columns>

 

 

 

<BatchEditingSettings EditType="Cell" />

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 



Code Behind

 

 

If (e.CommandName = "UpdateAll") Then

 

 

 

Dim recruitid As Integer = Convert.ToInt32(e.CommandArgument = "intRecruitId")

 

 

 

'Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)

 

 

 

Dim Phase As DropDownList = DirectCast(e.Item.FindControl("ddlPhase3"), DropDownList)

 

 

 

Dim Status As DropDownList = DirectCast(e.Item.FindControl("ddlStatus3"), DropDownList)

 

 

 

Dim Issue As DropDownList = DirectCast(e.Item.FindControl("ddlIssue3"), DropDownList)

 

 

 

Dim Ed As DropDownList = DirectCast(e.Item.FindControl("ddlEd3"), DropDownList)

 

 

 

Dim dtShip As TextBox = DirectCast(e.Item.FindControl("txtdtShip"), TextBox)

 

 

 

Dim dtReturn As TextBox = DirectCast(e.Item.FindControl("txtProjRtn"), TextBox)

 

 

 

Dim myDataGridItem As DataGridItem

 

 

 

For Each DataGridItem In myRadGrid.Items

 

 

sql =

 

"Update tblRSP SET dtProjReturn = '" & sanitizeString(dtReturn.Text) & "', intRSPStatusID = " & Status.SelectedValue & ", intRSPIssueID = " & Issue.SelectedValue & ", INTRSPEdID = " & Ed.SelectedValue & ", intPhaseID = " & Phase.SelectedValue & "" _

 

&

 

" Where intRecruitId =" & recruitid & " Update Recruit SET dtShip = '" & sanitizeString(dtShip.Text) & "' Where intRecruitId =" & recruitid

 

Response.Write(sql)

Response.End()

insertUpdateDelete(sql)

myRadGrid.Rebind()

 

 

Next

 

 

 

End If

 



Angel Petrov
Telerik team
 answered on 08 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?