Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
272 views
I have tried several ways to do this and none give the effect that I want.

I have a grid with a custom commanditem template.  It has standard buttons for edit actions on selected grid item.

                    <CommandItemTemplate> 
                        <div style="padding: 0 5px;margin:5px 5px 5px 5px;">  
                            <asp:HyperLink runat="server" ID="lnkAddNew" NavigateUrl="CreateWaiver.aspx"><img style="border:0;vertical-align:middle; margin-right:3px;" alt="" src="IMAGES/GridWebBlue/AddRecord.gif" />Create New Waiver</asp:HyperLink> 
                            <asp:HyperLink runat="server" ID="lnkRootCause" NavigateUrl='RootCause.aspx?id=<%# RadGrid1.SelectedValue.ToString() %>' Visible='<%# RadGrid1.EditIndexes.Count == 0 && !RadGrid1.MasterTableView.IsItemInserted  %>'>Root Cause</asp:HyperLink> 
                            <asp:LinkButton ID="cmdRootCause" runat="server" CommandName="RootCause.aspx" Visible='<%# RadGrid1.EditIndexes.Count == 0 && !RadGrid1.MasterTableView.IsItemInserted  %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/sign_question.png" />Root Cause</asp:LinkButton>&nbsp;&nbsp;  
                            <asp:LinkButton ID="cmdApproval" runat="server" CommandName="ApproveWaiver.aspx" Visible='<%# RadGrid1.EditIndexes.Count == 0 && !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/sign_tick.png" />Approve Selected Waiver</asp:LinkButton>&nbsp;&nbsp;  
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="CreateWaiver.aspx" Visible='<%# RadGrid1.EditIndexes.Count == 0 && !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/window_text.png" />View Details</asp:LinkButton>&nbsp;&nbsp;                              
                        </div> 
                    </CommandItemTemplate> 
                     
<ClientSettings EnablePostBackOnRowClick="true">  
  <Selecting AllowRowSelect="True" /> 
</ClientSettings> 


lnkRootCause is a little different.  the link navigates to another page passing an arg in the querystring.  the arg is the grid.selectedvalue

the problem is that NavigateURL is not evaluating properly

its evaluating to ...

http://localhost:63254/RootCause.aspx?id=<%# RadGrid1.SelectedValue.ToString() %> 
 

it would be nice if I could keep this in markup as it makes it simple.

If there is another more standard way to accomplish this please let me know.

to summarize I want to  ...

1) Select a row in grid.
2) Click a button in CommandItem
3) Navigate to another page passing variables from the GridDataItem of the selected row in the querystring.




Shinu
Top achievements
Rank 2
 answered on 26 May 2010
3 answers
74 views

Hi there,

event object returns null value in Firefox.  Do you have any other solution for this?

 

function

 

OnTabSelected(sender, eventArgs)

 

{

 

function OnAfterCallBack()

 

{

selectedTabElement.style.cursor = originalCursor;

}

 

var selectedTabElement = event.srcElement;

 

 

var originalCursor = selectedTabElement.style.cursor;

 

 

selectedTabElement.style.cursor =

'wait';

 

_postCallBackFunc = OnAfterCallBack;

}

Yana
Telerik team
 answered on 26 May 2010
3 answers
164 views
I have a RadAlert PopUp in my window and a divtag with java applet. The java applet controls come on top of my RadAlert. Is there a way to set RadAlert to be on top of all controls on the page?
Murugavel B
Top achievements
Rank 1
 answered on 26 May 2010
1 answer
163 views
Hi,
I'd like to rotate 3 different background colors on a daily basis on the RadScheduler.
Example:
Monday = Red,
Tues = Yellow,
Wed = Blue
Thurs = Red (again)
Fri = Yellow (again)
Sat = Blue (again)   ....And so on, in order of Red, Yellow, Blue.

What's the best way to go about doing this?
Thanks
Princy
Top achievements
Rank 2
 answered on 26 May 2010
0 answers
136 views
the question as the title:What's the differences between <%# Eval("Name")%> and <% #Eval("Name")%>?? I do not know why,When I Binded the data on the RadGrid I should use <%# Eval("Name")%> ,while when i binded the client-side event <% #Eval("Name")%> is right.
Liz Danniel
Top achievements
Rank 1
 asked on 26 May 2010
3 answers
138 views
I don't know what's the reason,it occur this error.I tried some methods,all doesn't work,can someone give me some ideas?
My version is 2009.1.402.35.My .Net FrameWork is .Net 3.5.
<
body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  > 
        <AjaxSettings> 
         
            <telerik:AjaxSetting AjaxControlID="cbxSolvedOrNo" > 
                <UpdatedControls > 
                    <telerik:AjaxUpdatedControl ControlID="lblWishTime" LoadingPanelID="RadAjaxPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="rdtpWishTime" LoadingPanelID="RadAjaxPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="dltServices" LoadingPanelID="RadAjaxPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> 
    </telerik:RadAjaxPanel> 
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" /> 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
 
    <table class="table" width="805px"> 
        
        <tr> 
            <td> 
                <table class="table" width="100%" border="0"> 
                    <tr> 
                        <td align="right" style="width: 120px;"> 
                            <asp:CustomValidator ID="cvUser" runat="server" ErrorMessage="必填" OnServerValidate="cvUser_ServerValidate" 
                                SetFocusOnError="true"></asp:CustomValidator>&nbsp;请&nbsp;&nbsp;求&nbsp;&nbsp;人: 
                        </td> 
                        <td style="width: 150px;"> 
                            <uc1:USelectUser ID="USelectUser1" runat="server" Width="150" ExtSeleClientEvent="selectUserObj" /> 
                        </td> 
                       
                    </tr> 
                </table> 
            </td> 
        </tr> 
        <tr> 
            <td> 
                <table class="table" width="100%"> 
                    <tr> 
                        <td align="right" style="width: 120px;"> 
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="rblEnventSource" 
                                ErrorMessage="必填" SetFocusOnError="True"></asp:RequiredFieldValidator>&nbsp;事件来源: 
                        </td> 
                        <td align="left"> 
                            <asp:RadioButtonList ID="rblEnventSource" runat="server" CellPadding="0" CellSpacing="5" 
                                RepeatLayout="Table" RepeatDirection="Horizontal"> 
                            </asp:RadioButtonList> 
                        </td> 
                        <td align="right" style="width: 80px;"> 
                            临时电话: 
                        </td> 
                        <td align="left" style="width: 110px;"> 
                            <telerik:RadTextBox ID="rtxtTelephone" runat="server" Width="90px"> 
                            </telerik:RadTextBox> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
        </tr> 
        <tr> 
            <td> 
                <table class="table" width="100%"> 
                    <tr> 
                        <td align="right" style="width: 120px;"> 
                            <asp:RequiredFieldValidator ID="rfvWishTime" runat="server" ErrorMessage="必填" ControlToValidate="rdtpWishTime" 
                                SetFocusOnError="True"></asp:RequiredFieldValidator>&nbsp;<asp:Label ID="lblWishTime" 
                                    runat="server" Text="期望解决时间:"></asp:Label> 
                        </td> 
                        <td align="left" style="width: 260px;"> 
                            <telerik:RadDateTimePicker ID="rdtpWishTime" runat="server" Width="145px"> 
                            </telerik:RadDateTimePicker> 
                            <asp:CompareValidator ID="cvWishTime" runat="server" ControlToCompare="rdtpRequestTime" 
                                ControlToValidate="rdtpWishTime" ErrorMessage="期望应大于请求日期!" Operator="GreaterThanEqual" 
                                SetFocusOnError="True"></asp:CompareValidator> 
                        </td> 
                        <td align="right" style="width: 60px; visibility: hidden;"> 
                            请求时间: 
                        </td> 
                        <td align="left" style="visibility: hidden;"> 
                            <telerik:RadDateTimePicker ID="rdtpRequestTime" runat="server" Width="150px"> 
                            </telerik:RadDateTimePicker> 
                        </td> 
                        <td align="left" style="width: 180px;"> 
                            <asp:CheckBox ID="cbxSolvedOrNo" runat="server" Text="是否直接解决" OnCheckedChanged="cbxSolvedOrNo_CheckedChanged" 
                                AutoPostBack="true" /> 
                            <asp:CheckBox ID="cbxReqairForm" runat="server" Text="是否为补单" OnCheckedChanged="cbxReqairForm_CheckedChanged" 
                                AutoPostBack="true" /> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
        </tr> 
        <tr> 
            <td> 
                <table class="table" width="100%"> 
                    <tr> 
                        <td align="right" style="width: 120px;"> 
                            用户请求内容: 
                        </td> 
                        <td> 
                            <telerik:RadTextBox ID="rtxbRequestContent" runat="server" Width="99%" Height="60px" 
                                TextMode="MultiLine" EmptyMessage="请输入用户请求内容"> 
                            </telerik:RadTextBox> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
        </tr> 
        <tr> 
            <td> 
                <table class="table" width="100%"> 
                    <tr> 
                        <td style="width: 120px" align="right"> 
                            备&nbsp;&nbsp;注: 
                        </td> 
                        <td> 
                            <telerik:RadTextBox ID="rtxbNote" runat="server" Width="99%" Height="40px" TextMode="MultiLine" 
                                ToolTip="备注" EmptyMessage="请输入备注内容"> 
                            </telerik:RadTextBox> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td style="width: 120px" align="right"> 
                            上传附件: 
                        </td> 
                        <td> 
                            <asp:UpdatePanel runat="server" ID="UpdatePanel1"> 
                                <ContentTemplate> 
                                    <asp:FileUpload ID="FileUpload1" runat="server" CssClass="content" Width="300px" /> 
                                </ContentTemplate> 
                                <Triggers> 
                                    <asp:PostBackTrigger ControlID="btnSave" /> 
                                </Triggers> 
                            </asp:UpdatePanel> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                            &nbsp; 
                        </td> 
                        <td> 
                            <asp:LinkButton ID="lbtnDownload" runat="server" ToolTip="下载" OnClick="lbtnDownload_Click"></asp:LinkButton> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
        </tr> 
        <div id="dltServices" runat="server"> 
            <tr> 
                <td> 
                    <span style="margin-left: 5px;"><b>服务单信息</b></span>&nbsp;<asp:CustomValidator ID="cvServices" 
                        runat="server" ErrorMessage="必选其一" OnServerValidate="cvServices_ServerValidate" 
                        SetFocusOnError="True"></asp:CustomValidator> 
                </td> 
            </tr> 
            <%-- <asp:UpdatePanel ID="UpdatePanel2" runat="server"> 
        <ContentTemplate>--%> 
            <tr> 
                <td> 
                    <table class="table" width="100%"> 
                        <tr> 
                            <td> 
                                <div> 
                                    <asp:DataList ID="dlServices" runat="server" Width="100%" DataKeyField="ID" OnItemDataBound="dlServices_ItemDataBound"> 
                                        <HeaderTemplate> 
                                            <table width="100%"> 
                                        </HeaderTemplate> 
                                        <ItemTemplate> 
                                            <tr> 
                                                <td style="width: 150px;" align="left"> 
                                                    <asp:Label ID="lblKeyID" runat="server" Text='<%#Eval("ID") %>' Visible="false"></asp:Label> 
                                                    <asp:CheckBox ID="chkItem" runat="server" Text='<%#Eval("ServiceType") %>' /> 
                                                </td> 
                                                <td align="left"> 
                                                    <%--  <telerik:RadTextBox ID="txtApply" runat="server" Width="90%" TextMode="MultiLine" 
                                                    EmptyMessage="请输入申请内容" Height="40px" CausesValidation="true"> 
                                                </telerik:RadTextBox>--%> 
                                                    <asp:TextBox ID="txtApply" runat="server" TextMode="MultiLine" Height="40px" Width="99%"></asp:TextBox> 
                                                </td> 
                                            </tr> 
                                        </ItemTemplate> 
                                        <FooterTemplate> 
                                            </table> 
                                        </FooterTemplate> 
                                    </asp:DataList> 
                                </div> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
        </div> 
        <%--</ContentTemplate> 
        <Triggers> 
        <asp:AsyncPostBackTrigger  ControlID="cbxSolvedOrNo" EventName="CheckedChanged"/> 
        </Triggers> 
          </asp:UpdatePanel>--%> 
        <tr> 
            <td align="center" style="height: 40px;"> 
                <asp:Button ID="btnSave" runat="server" Text="受理" Width="80px" OnClick="btnSave_Click" />&nbsp; 
                <asp:Button ID="btnStop" runat="server" Text="暂存" Width="80px" OnClick="btnStop_Click" />&nbsp; 
                <input id="Button1" type="button" value="返回" onclick="Close()" style="width: 80px;" /> 
            </td> 
        </tr> 
    </table> 
    </form> 
</body> 

  protected void cbxSolvedOrNo_CheckedChanged(object sender, EventArgs e) 
    { 
        lblWishTime.Visible = !cbxSolvedOrNo.Checked; 
        rdtpWishTime.Visible = !cbxSolvedOrNo.Checked; 
        rfvWishTime.Enabled = !cbxSolvedOrNo.Checked; 
        cvWishTime.Enabled = !cbxSolvedOrNo.Checked; 
        EnableServiceList(cbxSolvedOrNo.Checked); 
        dltServices.Visible = !cbxSolvedOrNo.Checked; 
 
    } 

Dimo
Telerik team
 answered on 26 May 2010
3 answers
80 views
Dear all,

In my master page i am using formdecorator,splitter,menu,tab and in content page i am using radgrid.So i want to know it is possible to load webresource or scriptresource files for that controls.I have not mentioned anywhere and it is taking default for all controls.Pzs i want ur help and give me example.

Best rgds
Azeheruddin khan

Vinkel
Top achievements
Rank 1
 answered on 26 May 2010
11 answers
651 views
Hello all

I have the following issue, I searched the demos and the forum and I didn't find what I want:

I have a grid with master table, and this grid have a detailed table which bounded on demand using DetailTableDataBind, ie when the user clicks expand button the detail table appears filled with data.

Also I have GridClientSelectColumn for the master and the detail (all the columns are coded in ASPX page NOT AutoGenerated)

<telerik:GridClientSelectColumn UniqueName="selColumn"> 
</telerik:GridClientSelectColumn> 



what I need is when the user clicks the Select checkbox for the master table, ALL rows in the detail table must be selected, and when the user clears (deselect) the checkbox of the master table, ALL the rows in the detail table must be cleared. Of course this must happen in client side functions or APIs (JavaScript).

Please help me ASAP..

Thanks in advance

Regards..
Yavor
Telerik team
 answered on 26 May 2010
1 answer
123 views
Hi all,
I'm newbie in web application testing mostly using ASP.net.
I'd like to ask is there anybody here had experience in testing row selection in Gridview using check box?

What behavior expected from row selection if all check box are checked then unchecked at bottom of the rows, at first row and the middle position of rows in grid view ?
included in the attachment for viewing to what I meant above matter.

Your valuable information or other references will be appreciated and I'm sorry if I entered the wrong forums.

Thanks and regards,
ikadewi

Pavlina
Telerik team
 answered on 26 May 2010
1 answer
84 views
Hello,

I'm designing a grid editing the individual records "InSite", using a Edit/Update-Cancel button, after push Edit Button, the row becames editable and I change some values, but when I push "Update" the labels  are still showing the original values, they don't change at all.
This is my simplest code:


.aspx
<telerik:RadGrid runat="server"  ID="RadGrid1" 
        OnNeedDataSource="RadGrid1_NeedDataSource" 
        AutoGenerateColumns="false" 
        AllowAutomaticUpdates="false" 
         > 
        <MasterTableView EditMode="InPlace"> 
            <Columns> 
                <telerik:GridBoundColumn DataField="Id"/> 
                <telerik:GridBoundColumn DataField="Name"/> 
                <telerik:GridEditCommandColumn /> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 

.aspx.cs

class Entity{ 
        private int _id; 
        public int Id { 
            get { return _id; } 
            set { _id = value; } 
        } 
 
        private string _name; 
        public string Name{ 
            get { return _name; } 
            set { _name = value; } 
        } 
    } 
 
    public partial class _Default : System.Web.UI.Page 
    { 
        private List<Entity> _list = new List<Entity>(){  
                new Entity(){ Id=1, Name="A Name" },  
                new Entity(){ Id=2, Name="Another Name" }, 
                new Entity(){ Id=3, Name="Pacman"} 
            }; 
 
        protected void Page_Load(object sender, EventArgs e){ } 
 
        protected void RadGrid1_NeedDataSource(object source,  Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
        { 
            RadGrid1.DataSource = _list; 
        } 
    } 


Any suggestions?

Regards
Radoslav
Telerik team
 answered on 26 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?