Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
159 views
I have a main grid that load with a detailGrid.

The detail grid has a 2 link buttons and some information from the transfer or repair process.  Depending on the Id of the person whom is logged in I want to be able to hide one or the other link button.  How can I accomplish this.  So basically if joe is logged in an he iniated the transfer process the link button for accept should not show in the detailgrid only the cancel linkbutton.  I am assuming I would take care of this in the databound event but I do not know how to get into the detail grid rows to lock these link buttons out.

<telerik:RadGrid ID="myIssueGrid" runat="server" Width="95%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                    <MasterTableView AutoGenerateColumns="false" DataKeyNames="intIssuedID" HierarchyDefaultExpanded="false" HierarchyLoadMode="ServerBind" 
                                        BorderColor="#404040" Font-Size="12" Font-Names="Veranda,arial,sans-serif" HeaderStyle-HorizontalAlign="Center" 
                                        GridLines="Both" BorderWidth="1px" ExpandCollapseColumn-ButtonType="ImageButton" ExpandCollapseColumn-CollapseImageUrl="~/Images/30.png" 
                                        ExpandCollapseColumn-ExpandImageUrl="~/Images/29.png"><ItemStyle HorizontalAlign="Center" />
                                        <AlternatingItemStyle BackColor="#B0C4DE"  HorizontalAlign="Center" />
                                        <HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                        <DetailTables>
                                            <telerik:GridTableView Name="myReIssueGrid" runat="server" DataKeyNames="intReIssueId" TableLayout="Fixed" BorderWidth="1px" CellPadding="6" Font-Size="10"
                                                AutoGenerateColumns="False" HeaderStyle-HorizontalAlign="Center" BorderColor="#404040" Font-Names="Veranda,arial,sans-serif" GridLines="Both" ExpandCollapseColumn-ButtonType="ImageButton"
                                                ExpandCollapseColumn-CollapseImageUrl="~/Images/30.png" ExpandCollapseColumn-ExpandImageUrl="~/Images/29.png">
                                                <ParentTableRelation>
                                                    <telerik:GridRelationFields DetailKeyField="intIssuedID" MasterKeyField="intIssuedID" />
                                                </ParentTableRelation>
                                                <HeaderStyle Font-Bold="true" HorizontalAlign="Center" CssClass="MostInnerHeaderStyle" />
                                                <ItemStyle CssClass="MostInnerItemStyle" HorizontalAlign="Center" />
                                                <AlternatingItemStyle CssClass="MostInnerAlernatingItemStyle" HorizontalAlign="Center" />
                                                <Columns>
                                                    <telerik:GridTemplateColumn HeaderText="Accept" ItemStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                             <asp:LinkButton ID="lnkAccept" runat="server" CommandArgument='<%# bind("intReIssueId") %>' CommandName="Accept">Accept</asp:LinkButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="Cancel" ItemStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                             <asp:LinkButton ID="lnkCancel" runat="server" CommandArgument='<%# bind("intReIssueId") %>' CommandName="Cancel">Cancel</asp:LinkButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridBoundColumn DataField="IssueBy" HeaderText="ISSUED FROM" ItemStyle-Font-Size="Smaller" />
                                                    <telerik:GridBoundColumn DataField="IssueTo" HeaderText="ISSUED TO"  ItemStyle-Font-Size="Smaller" />
                                                    <telerik:GridBoundColumn DataField="dtIssue" HeaderText="DT_ISSUED" />
                                                    <telerik:GridBoundColumn DataField="strTransaction" HeaderText="STATUS" />
                                                    <telerik:GridBoundColumn DataField="dtSign" HeaderText="DT_SIGNED" />
                                                </Columns>
                                            </telerik:GridTableView>
                                        </DetailTables>
                                         <Columns>
                                             <telerik:GridTemplateColumn HeaderText="Transfer" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                        <asp:LinkButton ID="lnkTransfer" runat="server" CommandArgument='<%# bind("intIssuedID") %>' CommandName="Transfer">
                                                        <asp:Image ID="imgReturn" runat="server" ImageUrl="~/Images/Transfer.png" BorderStyle="None" /></asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridBoundColumn HeaderText="SN" DataField="strSN" />
                                            <telerik:GridBoundColumn HeaderText="STATUS" DataField="strTransaction" />
                                            <telerik:GridBoundColumn HeaderText="ITEM" DataField="Item" />
                                            <telerik:GridBoundColumn HeaderText="DT_ISSUED" DataField="DT_Issued" />
                                            <telerik:GridBoundColumn HeaderText="DT_SIGNED" DataField="Dt_Signed" />
                                            <telerik:GridBoundColumn HeaderText="QTY" DataField="ftQTY" />
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>


Shinu
Top achievements
Rank 2
 answered on 10 Feb 2012
2 answers
240 views
Hi Telerik,

I'm using RadAsyncUpload with UpdatePanel, when add a PostBackTrigger, RadAsyncUpload working error,
Please review my demo code from url below

http://www.mediafire.com/?2cpxj1dwh3sebia

My example code's in ErrorWithUpdatePanel.aspx file.
When running with RadAjaxManager it's ok ~> ErrorWithUpdatePanel_OK.aspx
Please help. Thanks a lot
VnDevil
Top achievements
Rank 2
 answered on 10 Feb 2012
8 answers
159 views
Hello,

   In one of the gridtemplate columns, i have a textbox with popupcontrolextender in which it will have a bigger textbox, so that the user can type in the comments easily. 
My Scenario is, if i click on the textbox, a popup will be opened with big textbox in it. If i type something in, the content will be copied to the original textbox in the template column. I handled it through code behind.
 If i click on the textbox in the template column again, then the text i entered is displaying in that popup.But the problem is, if i do a postback on the page, and then if i click on that textbox again,the text is not showing up on the popup even though it is displaying in the original textbox.

My Code:

<telerik:GridTemplateColumn HeaderText="First IncSrc." UniqueName="MemFirstIncomeSource">
                       <ItemTemplate>
                           <asp:TextBox ID="txtMemFirstIncSrc" runat="server"  ToolTip="First Income Source"  
                                Width="80px">
                           </asp:TextBox>
                           <asp:PopupControlExtender ID="FirstIncSrcPopEx" runat="server" TargetControlID="txtMemFirstIncSrc"  CacheDynamicResults="true"  
                               PopupControlID="FirstIncSrcPnl" Position="Left" />
                          <asp:Panel ID="FirstIncSrcPnl" runat="server" CssClass="PopupModalWindow" Style="display: none">
                          
                                       <table>
                                           <tr>
                                               <td>
                                                   <telerik:RadTextBox ID="txtFirstIncSrc" runat="server"  TextMode="MultiLine" AutoPostBack="true" OnTextChanged="txtFirstIncSrc_TextChanged"
                                                      Width="280px" EmptyMessage="Click Here">
                                                   </telerik:RadTextBox>
                                               </td>
                                           </tr>
                                       </table>
                               
                           </asp:Panel>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
protected void txtFirstIncSrc_TextChanged(object sender, EventArgs e)
       {
           RadTextBox txtFirstIncSrc = (RadTextBox)sender;
           PopupControlExtender PopupControlExtender1 = (PopupControlExtender)txtFirstIncSrc.Parent.FindControl("FirstIncSrcPopEx");
           PopupControlExtender1.Commit(txtFirstIncSrc.Text);
 
       }

So, how do i display the template column textbox text in the popup which will be fired when the textbox is clicked. 

I don't see any onclick event for the textbox if i want to handle it  through code behind or javascript.

I have this grid inside a update panel like this...
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"  >
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="ButtonAdd" />
                                        <asp:AsyncPostBackTrigger ControlID="btnShow" />                                          
                                        <asp:AsyncPostBackTrigger ControlID="btnHide" />                                        
                                    </Triggers>
                                    <ContentTemplate>
                                        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
                                            Height="250px"  AllowAutomaticDeletes ="true" 
                                            CellSpacing="0" GridLines="None" ShowFooter="True" Skin="Vista"
                                            Width="1610px" onitemdatabound="RadGrid1_ItemDataBound" >
                                            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                                <WebServiceSettings>
                                                    <ODataSettings InitialContainerName="">
                                                    </ODataSettings>
                                                </WebServiceSettings>
                                            </HeaderContextMenu>
                                            <MasterTableView AllowAutomaticDeletes="True"  DataKeyNames="Number" >
                                                <CommandItemSettings ExportToPdfText="Export to PDF" />
                                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                                </RowIndicatorColumn>
                                                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                                </ExpandCollapseColumn>
                                                <Columns>


Please see my other post here, which has the complete code:
http://www.telerik.com/community/forums/aspnet-ajax/grid/problem-in-row-delete-clientside.aspx 


Thanks
Jagat
Top achievements
Rank 1
 answered on 10 Feb 2012
7 answers
164 views
I have a nice grid working, and in place add,edit and delete working great.

However I am now trying to get a drop down list to trigger the "OnSelectedIndexChanged" event so I can obtain the cost and sell price of the part and place it in the appropriate fields.

<Columns>
                                                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                                                        CancelImageUrl="~/Images/cancel_16x16.png" EditImageUrl="~/Images/edit_16x16.png"
                                                                        InsertImageUrl="~/Images/update_16x16.png" UpdateImageUrl="~/Images/update_16x16.png"
                                                                        HeaderStyle-Width="50px">
                                                                        <ItemStyle CssClass="MyImageButton" />
                                                                    </telerik:GridEditCommandColumn>
                                                                    <telerik:GridDropDownColumn DataField="PartId" DataSourceID="qry_Parts" HeaderText="Part"
                                                                        ListTextField="Description" ListValueField="PartId" UniqueName="EditPartId" ColumnEditorID="GridDropDownColumnEditorParts"
                                                                        EnableEmptyListItem="False" HeaderStyle-Width="320px">
                                                                    </telerik:GridDropDownColumn>

Neither the GridBouncColumn or the referering ColumnEditor allow this event.

How can I achive this?

Thanks in advance.
Jason
Top achievements
Rank 1
 answered on 09 Feb 2012
7 answers
250 views

Hi,

I'm using a function that I found in the online demo's for deleting tabs. And it seems to work great but when I deleted some tabs and I then click on an existing tab (just selecting it - not deleting it) all deleted tabs are returned. Am I forgetting something because its seems that the remove function only changes the view and not the tabs and pageviews collections

function
deleteTab(tabText)
{
    var tabStrip = $find("<%= rtsTabs.ClientID %>");
    var multiPage = $find("<%= multiPage.ClientID %>");
    var tab = tabStrip.findTabByText(tabText);
    var pageView = tab.get_pageView();

    tabStrip.get_tabs().remove(tab);
    multiPage.get_pageViews().remove(pageView);
}

Thanks

Bert

Kevin
Top achievements
Rank 1
 answered on 09 Feb 2012
1 answer
64 views
Hello,

I have the following code for a tab strip and related necessary controls.  All my navigational hyperlinks are javascript function calls to the "AddTab" function shown below. The server side code to add the tab and user control is also below.  

Given the code and functionality below, how can I add a "Close Tab" icon on each tab to allow the user to close the tab?  I have found many examples on this site but none of them are similar to my usage, and when I attempt to merge the logic, it fails.  100% of the tabs are generated dynamically from the client. There aren't any tabs pre-loaded when the site is loaded.  

If there's anything I left out or you need information, let me know!

Thanks!
Kevin



<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                        <UpdatedControls><telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                            <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
                            <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="LoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                        <UpdatedControls><telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
                            <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="LoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>


function AddTab(controlToAdd)
    {
        var tabstrip = $find("<%= RadTabStrip1.ClientID %>");
        var tab = new Telerik.Web.UI.RadTab();
        tab.set_text(controlToAdd);
        tabstrip.trackChanges();
        tabstrip.get_tabs().add(tab);
        tabstrip.commitChanges();
        tab.click();
    }

protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
        {
            string tabID;
 
            tabID = e.PageView.ID.IndexOf('-') < 0 ? e.PageView.ID : e.PageView.ID.Substring(0, e.PageView.ID.IndexOf('-'));
            tabID = tabID.Replace("_", " ");
 
            Control userControl = Page.LoadControl(Utilities.CachedData.GetUserControlPath(tabID));
             
            userControl.ID = e.PageView.ID + "_userControl";
 
            e.PageView.Controls.Add(userControl);
        }
 
        private void AddPageView(RadTab tab)
        {
            Random random = new Random();
            int randomNumber = random.Next(0, 1000000);
 
            RadPageView pageView = new RadPageView();
            pageView.ID = tab.Text.Replace(" ", "_") + "-" + randomNumber.ToString();
            RadMultiPage1.PageViews.Add(pageView);
            tab.PageViewID = pageView.ID;
        }
 
        protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
        {
            AddPageView(e.Tab);
            e.Tab.PageView.Selected = true;
        }
Kevin
Top achievements
Rank 1
 answered on 09 Feb 2012
5 answers
103 views
Hi

I am facing a designing problem with RadPanel.

It appears correctly on first page load but after post back it appears with black borders in IE 8, but it appears correctly in IE 9, Firefox and Chrome.
I have attatched the both images as sample, please suggest me which css class to fix.

Before image is the display on first load,
After image is the display after page is loaded after post back it adds the balck borders :(
Kate
Telerik team
 answered on 09 Feb 2012
1 answer
157 views
I have tied my chart to a sqldatasource.  But I can't get the legend to reflect the the categories showing up.  Can someone show me an example or a demo where the legend reflects the categories in a sqldatasource?
Richard
Top achievements
Rank 1
 answered on 09 Feb 2012
8 answers
421 views
I am updating some custom controls and am having trouble figuring out how to cancel a postback on a RadListBox from the

ClientSelectedIndexChanged

handler. To explain...I have a page that contains a RadListBox, a RadTabStrip, and a RadMultiPage which are all linked. When the user selects a item from the RadListBox I use the ClientSelectedIndexChanged handler to check if the linked Tab/PageView already exists and if so then set them selected...if not then they are created and selected server-side. I have a prototype version which uses a RadTreeView that works fine using the set_postback( false ) method on the node in the OnClientNodeClicking handler...does anyone know how to do the same with a RadListBox??

Dustin
Top achievements
Rank 1
 answered on 09 Feb 2012
1 answer
124 views
I've added a radlistview to a page, with a radrating control inside of it. It's displaying about 330 records. 

I then went ahead and put the radlistview in an radupdate panel, but i can't see any difference in how the page behaves. I then went ahead and added a rad loading panel to the page. And still i can't see any difference to the page. I left initial delay and min display at 0, no effect. Changed min display to 2000, no effect.

Here's what my aspx markup looks like:

 I then went ahead and put the radlistview in an radupdate panel, but i can't see any difference in how the page behaves. I then went ahead and added a rad loading panel to the page. And still i can't see any difference to the page. I left initial delay and min display at 0, no effect. Changed min display to 2000, no effect.Here's what my aspx markup looks like: (i deleted the template content for brevity). Can anyone tell me what i might be doing wrong here? This is with the 2011 Q2 release.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<div class="list_view_cont">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
        Skin="Default" AnimationDuration="1000" IsSticky="True" Transparency="50">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
        HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" >
        <telerik:RadListView ID="RadListView1" runat="server" ItemPlaceholderID="gameList"
            DataSourceID="sqlDsGames" DataKeyNames="ID,Rating"
            onitemcreated="RadListView1_ItemCreated">
        <LayoutTemplate>
            <ul>
                <li class="row_header">
                    <div class="row_name">
                        <h2><asp:LinkButton ID="lbtnTitle" CommandName="Sort" CommandArgument="Title" runat="server">MMO Title</asp:LinkButton></h2>
                    </div><!--end row name-->
                 
                    <div class="row_genre">
                        <h2><asp:LinkButton ID="lbtnCategory" CommandName="Sort" CommandArgument="Category" runat="server">Genre</asp:LinkButton></h2>
                    </div><!--end row genre-->
                 
                    <div class="row_release">
                        <h2><asp:LinkButton ID="lbtDate" CommandName="Sort" CommandArgument="ReleasedDate" runat="server">Release Date</asp:LinkButton></h2>
                    </div><!--end row release-->
                 
                    <div class="row_platform">
                        <h2><asp:LinkButton ID="lbtPlatform" CommandName="Sort" CommandArgument="Platform" runat="server">Platform</asp:LinkButton></h2>
                    </div><!--end row platform-->
                 
                    <div class="row_rating">
                    <h2><asp:LinkButton ID="lbtnRating" CommandName="Sort" CommandArgument="Rating" runat="server">Rating</asp:LinkButton></h2>
                    </div><!--end row rating-->
                 
                    <div class="row_votes">
                    <h2>
                        <asp:LinkButton ID="lbtnVotes" CommandName="Sort" CommandArgument="Votes" runat="server">Votes</asp:LinkButton></h2>
                    </div><!--end row votes-->
                </li>
                <fieldset id="gameList" runat="server" />
            </ul>
        </LayoutTemplate>
 
        <ItemTemplate>
       
        </ItemTemplate>
        <AlternatingItemTemplate>
        </AlternatingItemTemplate>
 
    </telerik:RadListView>
    </telerik:RadAjaxPanel>
</div>
Antonio Stoilkov
Telerik team
 answered on 09 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?