Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
196 views

How I can define programatically the options like "contains", "grather than" ?
How I can change the style of apply button?
How I can set CaseSentive = false?
Thanks
July
Top achievements
Rank 2
 answered on 19 Jul 2011
3 answers
155 views

Hi

How can I get the content of an html file along with an ‘I Accept’ button in the RadWindow?

Many Thanks

Regards

Marin Bratanov
Telerik team
 answered on 19 Jul 2011
3 answers
596 views
Hi,

  Below in my code in aspx and .cs files

<asp:ScriptManager ID="sm" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="upTest" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:UpdatePanel ID="upPostBack" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Button ID="btnPostBack" runat="server" Text="Post Back" OnClick="btnPostBack_Click" />
                    <asp:Label ID="lblPostBack" runat="server"></asp:Label>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdatePanel ID="upc" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <telerik:RadCaptcha CssClass="rcPanel" runat="server" IgnoreCase="true" CaptchaImage-UseRandomFont="false"
                        CaptchaImage-TextChars="LettersAndNumbers" CaptchaImage-RenderImageOnly="true"
                        ID="capSignup" ValidationGroup="valSignup" ValidatedTextBoxID="txtCaptcha" ErrorMessage="error"
                        IsValid="true">
                    </telerik:RadCaptcha>
                    <asp:TextBox runat="server" ID="txtCaptcha" validateexp="required,errMsg:Enter the above code"
                        ValidationGroup="valSignup"></asp:TextBox>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:Button ID="btn" runat="server" OnClick="btn_Click" Text="Submit" ValidationGroup="valSignup" />
            <asp:Label ID="lbl" runat="server"></asp:Label>
        </ContentTemplate>
    </asp:UpdatePanel>

protected void btn_Click(object sender, EventArgs e)
   {
       capSignup.Validate();
       Page.Validate();
       if (capSignup.IsValid)
           lbl.Text="Valid";
       else
           lbl.Text = "In Valid";
   }
 
   protected void btnPostBack_Click(object sender, EventArgs e)
   {
       lblPostBack.Text = DateTime.Now.ToShortTimeString();
   }

Captcha is working fine when i click on "Submit" button with out clicking "Post Back" button.
If i click on "Post Back" then "Submit", IsValid property returns false.

Could any one please help me.

Thanks,
Sumanth
Slav
Telerik team
 answered on 19 Jul 2011
5 answers
237 views
I have a hierarchical grid with an image button as the first column on both parent and child. Now I want to show a tooltip , which is a usercontrol with a databound grid inside and couple of labels.  This grid inside a usercontrol is populated based on the ID of the row of the grid where the image button is clicked. Also the image button sends 2 other values which updates the text of the label controls. Child grid also has an image button which when clicked, pop ups the same user control and sends the ID to the popup, populates the grid inside and sends 2 other values which updates the text in the label. How do I achieve this? Don't have a working solution, so guide me with the working sample code. Thanks.
Marin Bratanov
Telerik team
 answered on 19 Jul 2011
1 answer
118 views
I have a solution similiar to the outlined example here: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/tooltipgrid/defaultcs.aspx?product=tooltip

However, I would like to have a mouseover tooltip within the detail rows as well.

Adding the controls of the master table view to the tooltip manager works fine. Adding the controls of the detail table also works but the tooltip doesn't work. In viewing the source of the web page, I noticed that the TargetControls for my detail rows was empty. Also, I could not find the detail row information in the view source. The same thing happens with the example above.

If you expand Bigfoot Breweries and do a view source on the page, you will find Bigfoot Breweries but you cannot find Laughing Lumberjack Lager (which is one of the detail rows). I think once I get the detail rows to be persisted on the page, the tooltip manager will work.

Any ideas?



Marin Bratanov
Telerik team
 answered on 19 Jul 2011
1 answer
116 views
i am having an asp:panel on the page.. in that page, i want to insert a RadPanelBar. I have inserted an item in a PanelBar.. Now i want to generate a click event handler on the click of the item. How do i do that? my code is : 

  protected void Page_Load(object sender, EventArgs e)
    {   
    }
    protected void Panel1_Load(object sender, EventArgs e)
    {
RadPanelBar pb = new RadPanelBar();
        Panel1.Controls.Add(pb);
        RadPanelItem rpi = new RadPanelItem("Student");
        pb.Items.Add(rpi);
        
    }
Shinu
Top achievements
Rank 2
 answered on 19 Jul 2011
5 answers
113 views
Using the Occupied Timeslots example, I would like to be able to take into account the diiferent resources that I have. For example, although Room A may be occupied, I would still be able to schedule Room B for the same time slot. How could I go about doing this?

Peter
Telerik team
 answered on 19 Jul 2011
1 answer
298 views
Hi,

I have created following context menu:

<telerik:RadContextMenu OnClientShowing="OnContextMenuShowing" OnClientItemClicked="OnContextMenuClick"
                  ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick" EnableRoundedCorners="true"
                  EnableShadows="true">
                  <Items>
                    <telerik:RadMenuItem Text="Copy" />
                    <telerik:RadMenuItem Text="Cut" />
                    <telerik:RadMenuItem Text="Paste Above" />
                    <telerik:RadMenuItem Text="Paste Below" />
                  </Items>
                </telerik:RadContextMenu>


OnContextMenuClick I am writing some validation and I want to cancel the postback if validations fails, but its not happening.

I have searched everywhere but did not find any suitable answers for this , many places I found the following statement but it is not working 

args.set_cancel(true);

args in OnContextMenuClick does not have set_cancel method.

Also tried with return false; that too not worked.

Please help me by providing solutions its urgent.


Thanks & Regards
Shinu
Top achievements
Rank 2
 answered on 19 Jul 2011
1 answer
92 views
Hi,
Our system has support for multiple languages. We have used RadGrid control in our web site. We need multilingual support for following texts -
  • Refresh (Button)
  • All filter texts (e.g. NoFilter, Contains, DoesNotContain etc).
  • Tooltips for buttons
    • First page
    • Previous page
    • Next page
    • Last page
  • Page size (Label in footer)
  • Items in (Label in footer)
  • Pages (Label in footer)

Last two display like - "15 items in 2 pages"

How can we do this?

Thanks.

Shinu
Top achievements
Rank 2
 answered on 19 Jul 2011
3 answers
127 views

I originally build a 2 tier grid but then need to put a 3rd tier on it, I followed the example site for tiered grids for adding on but when I build and run the 3rd portion never show up even though I have information in the database to show.  What am i doing wrong here.

 <telerik:RadGrid ID="myGridDeploy" runat="server" Width="95%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                    <MasterTableView AutoGenerateColumns="false" DataKeyNames="intMobilizationId" 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" />
                                        <Columns>
                                             <telerik:GridTemplateColumn HeaderText="Deployment" ItemStyle-HorizontalAlign="Left">
                                                <ItemTemplate>
                                                     <asp:LinkButton ID="lnkEdit" runat="server" CommandArgument='<%# bind("intMobilizationId") %>' CommandName="EditDeploy" text='<%# bind("strDeployment") %>'></asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridBoundColumn DataField="strHiearchy" HeaderText="UIC" />
                                            <telerik:GridBoundColumn DataField="dtDeploy" Headertext="DT_Deploy" />
                                            <telerik:GridBoundColumn DataField="dtDemob" HeaderText="DT_Demob" />
                                            <telerik:GridTemplateColumn HeaderText="Add Unit">
                                                <ItemTemplate>
                                                      <asp:ImageButton runat="server" ID="imgAdd"  CommandArgument='<%# bind("intMobilizationId") %>' CommandName="AddUnit" ImageUrl="~/Images/29.png" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="Delete">
                                                <ItemTemplate>
                                                      <asp:ImageButton runat="server" ID="imgDelete"  CommandArgument='<%# bind("intMobilizationId") %>' CommandName="DelDeploy" ImageUrl="~/Images/Delete Circle Small.png" OnClientClick="return confirm('Are you sure you want to delete deployment and all information!');" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                             <telerik:GridTemplateColumn HeaderText="Archive">
                                                <ItemTemplate>
                                                      <asp:ImageButton runat="server" ID="imgArchive"  CommandArgument='<%# bind("intMobilizationId") %>' CommandName="Archive" ImageUrl="~/Images/edit_icon.png" OnClientClick="return confirm('Are you sure you want to archive deployment');" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                        <DetailTables>
                                            <telerik:GridTableView Name="mySubUnits" runat="server" DataKeyNames="intUnitMobId" 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="intMobilizationId" MasterKeyField="intMobilizationId" />
                                                </ParentTableRelation>
                                                <HeaderStyle Font-Bold="true" HorizontalAlign="Center" CssClass="MostInnerHeaderStyle" />
                                                <ItemStyle CssClass="MostInnerItemStyle" HorizontalAlign="Center" />
                                                <AlternatingItemStyle CssClass="MostInnerAlernatingItemStyle" HorizontalAlign="Center" />
                                                <DetailTables>
                                                    <telerik:GridTableView DataKeyNames="intPositionId" Name="mySubPosition" Width="100%">
                                                         <ParentTableRelation>
                                                            <telerik:GridRelationFields DetailKeyField="intUnitMobId" MasterKeyField="intUnitMobId" />
                                                         </ParentTableRelation>
                                                         <Columns>
                                                            <telerik:GridBoundColumn DataField="strPara" HeaderText="Para" />
                                                            <telerik:GridBoundColumn DataField="strLine" Headertext="Line" />
                                                            <telerik:GridBoundColumn DataField="intPositionNum" HeaderText="Position" />
                                                         </Columns>
                                                    </telerik:GridTableView>
                                                </DetailTables>
                                                <Columns>
                                                    <telerik:GridTemplateColumn HeaderText="Unit" ItemStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                             <asp:LinkButton ID="lnkEdit" runat="server" CommandArgument='<%# bind("intUnitMobId") %>' CommandName="EditUnit" text='<%# bind("strUIC") %>'></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridBoundColumn DataField="strAAUIC" HeaderText="BN Uic" />
                                                    <telerik:GridBoundColumn DataField="strMobOrderNum" HeaderText="Order Num" />
                                                    <telerik:GridBoundColumn DataField="dtDeploy" HeaderText="DT_Deploy" />
                                                    <telerik:GridBoundColumn DataField="dtProjDemob" HeaderText="DT_Demob" />
                                                    <telerik:GridTemplateColumn HeaderText="Add Position">
                                                        <ItemTemplate>
                                                              <asp:ImageButton runat="server" ID="imgAddPosition"  CommandArgument='<%# bind("intUnitMobId") %>' CommandName="AddPosition" ImageUrl="~/Images/29.png" />
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                     <telerik:GridTemplateColumn HeaderText="Del All Position">
                                                        <ItemTemplate>
                                                              <asp:ImageButton runat="server" ID="imgDelPosition"  CommandArgument='<%# bind("intUnitMobId") %>' CommandName="DelAllPosition" ImageUrl="~/Images/30.png"
                                                              OnClientClick="return confirm('Are you sure you want to delete all positions');"/>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                     <telerik:GridTemplateColumn HeaderText="Import Positions">
                                                        <ItemTemplate>
                                                              <asp:ImageButton runat="server" ID="imgImportPosition"  CommandArgument='<%# bind("intUnitMobId") %>' CommandName="AddMul" ImageUrl="~/Images/Import.png" />
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="Delete Unit">
                                                        <ItemTemplate>
                                                              <asp:ImageButton runat="server" ID="imgDelete"  CommandArgument='<%# bind("intUnitMobId") %>' CommandName="DelUnit" ImageUrl="~/Images/Delete Circle Small.png"
                                                              OnClientClick="return confirm('Are you sure you want to delete unit and all positions');" />
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>
                                            </telerik:GridTableView>
                                        </DetailTables>
                                    </MasterTableView>
                                </telerik:RadGrid>


 Private Sub LoadGrid()
        Dim Id As String = ddlDeployments.SelectedValue
        Dim sqlwhere As String = ""

        If Id = "00" Then
            sqlwhere = ""
        Else
            sqlwhere = " and intMobilizationId = " & Id
        End If

        sql = "Select intMobilizationId, strDeployment, strHiearchy, Convert(varchar(10), dtDeploy, 111) dtDeploy, Convert(varchar(10), dtDemob, 111) dtDemob from tblMobDeployment " _
            & "where bitArchive is NULL " & sqlwhere & " Order by dtDeploy"
       
        myDataTable = New DataTable
        myDataTable = getData(sql)

        myGridDeploy.DataSource = myDataTable
        myGridDeploy.DataBind()

    End Sub

 'All code associated with the detail tables of the gridview
    Protected Sub myGridDeploy_DetailTableDataBind(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles myGridDeploy.DetailTableDataBind

        Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
            Select e.DetailTableView.Name
            Case "mySubUnits"
                sql = "Select intUnitMobId, intMobilizationId, strMobOrderNum, strAAUic, strUIC, CONVERT(varchar(10), dtDeploy, 111) dtDeploy, CONVERT(varchar(10), dtProjDemob, 111) dtProjDemob from tblMobUnits " _
                    & "where bitArchive is NULL and intMobilizationId = " & e.DetailTableView.ParentItem.GetDataKeyValue("intMobilizationId") & " Order by intMobilizationId"

                e.DetailTableView.DataSource = getData(sql)

            Case "mySubPosition"
                sql = "Select intPositionId, intUnitMobId, strPara, strLine, intPositionNum from tblMobUnitPosition " _
                   & "where intUnitMobId in (Select intUnitMobId from tblMobUnits where intMobilizationId = " & e.DetailTableView.ParentItem.GetDataKeyValue("intMobilizationId") & ")"

                e.DetailTableView.DataSource = getData(sql)
        End Select
    End Sub

    Protected Sub myGridDeploy_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles myGridDeploy.Init
        myGridDeploy.MasterTableView.ExpandCollapseColumn.ItemStyle.CssClass = "expandCol"
    End Sub

    Protected Sub myGridDeploy_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles myGridDeploy.PreRender
        HideExpandColumnRecursive(myGridDeploy.MasterTableView)
    End Sub




Vasil
Telerik team
 answered on 19 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?