Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
170 views
Hi

My scenario. I have few links button in my page. On Clicking these buttons, I want to display the corresponding search results from Google in a radwindow. I was not even able to open Google within a radwindow. What should I do?

Thankyou
Merin.
Shinu
Top achievements
Rank 2
 answered on 25 Sep 2013
3 answers
63 views
I'm trying to duplicate our in-house tabs using the TabStrip and I have got all but one part working. I'm copying  my wfTabs.css which controls our in house custom tabs and the custom .css for radTabstrip I'm trying to create. As you can see from the image I'm attaching - I have all looking the same except the selected tab left image. This is found at tabHeader .current. I tried putting it in SelectedTab class but that doesn't work. I need it to attach to the LI element for selected tab (as I did with the right image) but I don't see a way to do that. Can someone help me fix this.

wfTabs.css:

.tabHeader {
    float:left;
    width:100%;
    /*  background:#DAE0D2 url("bg.gif") repeat-x bottom; */
    background: white;
    font-size:8pt;
    line-height:normal;
    border-bottom: 1pt solid #CFCFCF;
}
.tabHeader ul {
    margin:0;
    padding:3px 10px 0;
    list-style:none;
}
.tabHeader li {
    float:left;
    background:url("../images/wfTabs/left_blue.gif") no-repeat left top;
    margin:0;
    padding:0 0 0 9px;
}
.tabHeader a, .tabHeader a:visited {
    float:left;
    display:block;
    background:url("../images/wfTabs/right_blue.gif") no-repeat right top;
    padding:3px 10px 3px 3px;
    text-decoration:none;
    font-weight:bold;
    color:#ffffff;
    outline:0;
}
.tabHeader a:hover
{
    text-decoration:underline;
    color:#ffffff;
    cursor:pointer;
}

.tabHeader a:focus, .tabHeader a:active
{
    outline:0;
    text-decoration:underline;
   color:#ffffff !important;
    }
    

.tabHeader .disabledTab a
{
    color:#ffffff;
    cursor:text;
}
 
.tabHeader .disabledTab a:hover
{
    text-decoration:none;
}

.tabHeader .current {
    background-image:url("../images/wfTabs/left_grey.gif");
}
.tabHeader .current a {
    background-image:url("../images/wfTabs/right_grey.gif") !important;
    color:#333 !important;
}
.tabHeader .current a:hover {
    text-decoration:none;
}

.tabHeader .markgreen
{
    background-image:url("../images/wfTabs/left_green.gif");
}
.tabHeader .markgreen a {
    background-image:url("../images/wfTabs/right_green.gif") !important;
    color:#ffffff !important;
}
________________________________________________________________________________________________
custom radTabstrip .css:
.radTabDiv {
    float: left;
    width: 100%;
    /*  background:#DAE0D2 url("bg.gif") repeat-x bottom; */
    background: white;
    font-size: 8pt;
    line-height: normal;
    border-bottom: 1pt solid #CFCFCF;
    margin: 0;
    padding: 3px 10px 0;
    list-style: none;
}

div.RadTabStrip .rtsLI {
    margin-right: 2px;
    float: left;
    background: url("../images/wfTabs/left_blue.gif") no-repeat left top;
    margin: 0;
    padding: 0 0 0 9px;
}

div.RadTabStrip .rtsUL {
    margin: 0;
    padding: 3px 10px 0;
    list-style: none;
}

div.RadTabStrip .rtsLink {
    float: left;
    display: block;
    background: url("../images/wfTabs/right_blue.gif") no-repeat right top;
    padding: 3px 10px 3px 3px;
    text-decoration: none;
    font-weight: bold;
    color: #ffffff;
    outline: 0;
}

div.RadTabStrip .rtsSelected {
    background-image: url("../images/wfTabs/right_grey.gif") !important;
    color: #333 !important;
}


Magdalena
Telerik team
 answered on 25 Sep 2013
3 answers
270 views
I have a requirement that, when  selected(RadAsyncUpload) a file, the file details should be populated in grid on the same window. how can i implement.
File details like : size , name , path.

Please help me
Shinu
Top achievements
Rank 2
 answered on 25 Sep 2013
2 answers
359 views
Hi,

Is it possible to capture the position of a RadWindow opened using JavaScript?
I am opening a RadWindow using the code below. After opening and then moving the RadWindow a function OnClientDragEnd is not called. I need to capture the position of a rad window so that I can re-open it after a postback.

function OpenWnd(Title, Url) {

var oWindow = window.radopen(Url, null);

oWindow.SetSize(800, 500);

oWindow.SetTitle(Title);

oWindow.SetModal(false);

oWindow.Center();

oWindow.set_status('');

oWindow.OnClientDragEnd = "OnClientDragEnd";

}

function OnClientDragEnd(sender, args) {

alert('aaa');

var position = sender.getWindowBounds();

var x = position.x;

var y = position.y;

var ht = position.height;

var w = position.width;

 

}

Many thanks

 

Louise
Top achievements
Rank 1
 answered on 25 Sep 2013
3 answers
1.3K+ views
Hi I am binding a radgrid and column width is adjusted by a cssclass as shown below in code, But issue is, this css works on column data but not on hearders... i am reffering to latest telerik dll.

<style type="text/css">
    .AutoShrink {
        width: auto !important;
    }
</style>
<telerik:RadGrid ID="rgWorkInProgress" runat="server" AllowPaging="True" AllowSorting="True" ShowStatusBar="True"
    AutoGenerateColumns="False" PageSize="10" ShowGroupPanel="False" AllowFilteringByColumn="true"
    CellSpacing="0" GridLines="None" EnableTheming="true" AllowCustomPaging="true"
    OnNeedDataSource="rgWorkInProgress_NeedDataSource" OnPageIndexChanged="rgWorkInProgress_PageIndexChanged"
    OnSortCommand="rgWorkInProgress_SortCommand" HeaderStyle-CssClass="AutoShrink">

    <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />

    <ClientSettings AllowDragToGroup="false">
        <Resizing AllowColumnResize="true" AllowResizeToFit="true" />
        <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true" />
        <ClientEvents OnFilterMenuShowing="filterMenuShowing" />
    </ClientSettings>

    <MasterTableView TableLayout="Auto" AllowCustomSorting="true" AllowNaturalSort="false" AllowFilteringByColumn="True" CssClass="AutoShrink">

        <EditFormSettings>
            <EditColumn />
        </EditFormSettings>

        <HeaderStyle HorizontalAlign="Left" Wrap="false" CssClass="AutoShrink"/>
        <FilterItemStyle HorizontalAlign="Left" Wrap="false" />
        <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Wrap="false" />
Eyup
Telerik team
 answered on 25 Sep 2013
2 answers
146 views
Hi,
i am having rad grid in which i used EditMode and i want to do validations using radwindow like
1 ] when i click delete ,it must ask for confirmation and for yes delete code execute
2 ] when i click update ,it must ask for confirmation and for yes update code execute
3 ]On insert button click it will show success alert for data insertion

My aspx code
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
   </telerik:RadWindowManager>
   <telerik:RadWindow ID="radwindowPopup" runat="server" Animation="FlyIn" CssClass="modalPopup"
       DestroyOnClose="true" EnableShadow="true" KeepInScreenBounds="true" Width="420px"
       Height="150px" MaxHeight="150px" MaxWidth="420px" MinHeight="150px" MinWidth="420px"
       Modal="true" RenderMode="Classic" VisibleTitlebar="true" VisibleStatusbar="false"
       Behaviors="Close" Title="Manifest-BI" Skin="Outlook">
       <ContentTemplate>
           <center>
               <div style="padding: 20px">
                   <asp:Label ID="lblMsg" runat="server"></asp:Label>
                   <br />
                   <br />
                   <telerik:RadButton ID="btnOk" runat="server" Text="Yes" Width="70px" Skin="Outlook" />
                   <telerik:RadButton ID="btnCancel" runat="server" Text="No" Width="70px" Skin="Outlook" />
               </div>
           </center>
       </ContentTemplate>
   </telerik:RadWindow>
   <fieldset id="fs1" runat="server" style="height: auto; width: 650PX; border-style: outset;
       border-width: 1.5px; border-color: Blue; z-index: 1" class="loginField">
       <legend style="border-style: outset; border-width: 1.5px; border-color: Blue; font-weight: bold;
           z-index: 1">COMPANY LIST</legend>
       <center>
           <table>
               <tr>
                   <td>
                       <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" ClientEvents-OnRequestStart="onRequestStart">
                           <%-- EnableViewState="False" --%>
                           <telerik:RadGrid ID="RadGrid1" runat="server" Width="530px" OnNeedDataSource="RadGrid1_NeedDataSource"
                               AllowPaging="true" PageSize="10" AllowSorting="true" ShowGroupPanel="True" Skin="WebBlue"
                               OnDeleteCommand="RadGrid1_DeleteCommand" HeaderStyle-Font-Bold="true" OnPreRender="RadGrid1_PreRender"
                               OnUpdateCommand="RadGrid1_UpdateCommand" OnItemCreated="RadGrid1_ItemCreated"
                               OnInsertCommand="RadGrid1_InsertCommand" OnItemCommand="RadGrid1_ItemCommand">
                               <ExportSettings ExportOnlyData="true" OpenInNewWindow="true" IgnorePaging="true">
                                   <Pdf AllowAdd="true" AllowCopy="true" AllowModify="true" AllowPrinting="true" BorderColor="Black"
                                       BorderStyle="Medium" BorderType="AllBorders" PageBottomMargin="20px" PageFooter-LeftCell-TextAlign="Center"
                                       PageFooterMargin="20px" PageHeader-LeftCell-TextAlign="Center" PageHeaderMargin="20px"
                                       PageLeftMargin="35px" PageRightMargin="35px" PageTitle="List Of Companies and Details"
                                       PageTopMargin="35px" PaperSize="A4" UserPassword="ss">
                                   </Pdf>
                               </ExportSettings>
                               <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
                               <ClientSettings Selecting-AllowRowSelect="true" AllowDragToGroup="True" EnablePostBackOnRowClick="true">
                                   <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True"></Selecting>
                               </ClientSettings>
                               <MasterTableView EditMode="EditForms" AutoGenerateColumns="true" DataKeyNames="CompId"
                                   CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="true">
                                   <CommandItemSettings ShowExportToPdfButton="true" />
                                   <CommandItemSettings ShowExportToExcelButton="true" />
                                   <CommandItemSettings ShowExportToWordButton="true" />
                                   <CommandItemSettings ShowExportToCsvButton="true" />
                                   <EditFormSettings FormMainTableStyle-HorizontalAlign="Center" EditColumn-ButtonType="ImageButton"
                                       FormTableStyle-Width="350px" FormTableButtonRowStyle-HorizontalAlign="Center"
                                       FormTableStyle-CellPadding="3" FormMainTableStyle-Font-Bold="true" FormMainTableStyle-ForeColor="Purple"
                                       FormStyle-CssClass="" FormTableStyle-CellSpacing="5" InsertCaption="Add New Record"
                                       FormCaptionStyle-Font-Bold="true" FormCaptionStyle-Font-Underline="true" FormCaptionStyle-ForeColor="Black"
                                       FormCaptionStyle-Font-Size="Large" FormCaptionStyle-HorizontalAlign="Center"
                                       FormCaptionStyle-Width="100%">
                                       <FormStyle Width="100%" BackColor="LightCyan"></FormStyle>
                                   </EditFormSettings>
                                   <Columns>
                                       <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn">
                                       </telerik:GridEditCommandColumn>
                                   </Columns>
                               </MasterTableView>
                               <MasterTableView>
                                   <Columns>
                                       <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                                           ButtonType="ImageButton" />
                                   </Columns>
                               </MasterTableView>
                           </telerik:RadGrid>
                       </telerik:RadAjaxPanel>
                   </td>
               </tr>
           </table>
       </center>
   </fieldset>
Thanks
Eyup
Telerik team
 answered on 25 Sep 2013
16 answers
1.8K+ views
i have a radgrid which allowed for multirowselection = true.  i can select more than one row by check the select column.  All the selected rows will be deselected if i click on any row or record inside the grid.  Is there any way that i can remain all those selected rows.

Eyup
Telerik team
 answered on 25 Sep 2013
1 answer
88 views
I have a RadGrid definition as defined below (column definitions snipped for brevity).

I have an odd issue w/ the "Add New Record" button in the CommandItemDisplay 'disappearing' randomly.

What I mean, simply, is for random people at random periods of time for some inexplicable reason, when the RadGrid is displayed to the user, there will be no "Add New Record" option at the bottom of the grid. Two people side-by-side can be using the app, one will get the button, the other won't. Once someone doesn't get the button, it will not immediately come back, but, if they wait long enough and go back into the application, it will mysteriously reappear. Stopping the application pool and restarting it will usually 'clear' up the problem "immediately", but, that has the unfortunate side-effect of knocking everyone else out too.

I've looked through the IIS logs, and I do not see any unusual "errors" (no 4xx or 5xx status codes) associated w/ the user when it does happen. The application is compiled and deployed. Also, for what its worth, I do not recall this problem occurring before the application was precompiled for deploy.

I don't really expect an "answer" to this issue here, since it isn't reproducible at a whim. Instead, I was hoping someone might give me some insight as to where the data for the CommandItemDisplay line originates from (WebResource.axd file?) and maybe, just maybe, someone else has encountered this issue and discovered what they did wrong or had to change within IIS to resolve it. It sure would be helpful since I get at least 6 calls a day about this issue.

FWIW, I'm using the latest version of the controls, ASP.NET AJAX, IIS server running on 2008r2, with a .NET 4.0 application.

                <telerik:RadGrid    ID="RadGrid_Details"
                                    runat="server"
                                    AutoGenerateColumns="False"
                                    DataSourceID="SqlDataSource_Details"
                                    GridLines="None"
                                    AllowAutomaticInserts="True"
                                    AllowAutomaticDeletes="True"
                                    AllowAutomaticUpdates="True"
                                    AllowSorting="True"
                                    onitemcommand="RadGrid_Details_ItemCommand"
                                    OnItemDeleted="RadGrid_Details_ItemDeleted"
                                    OnItemInserted="RadGrid_Details_ItemInserted"
                                    OnItemUpdated="RadGrid_Details_ItemUpdated"
                                    Width="925px"
                                    onitemdatabound="RadGrid_Details_ItemDataBound"
                                    onprerender="RadGrid_Details_PreRender" >
                    <ClientSettings AllowDragToGroup="True">
                    </ClientSettings>
                    <MasterTableView DataSourceID="SqlDataSource_Details"
                                     autogeneratecolumns="False"
                                     commanditemdisplay="Bottom"
                                     editmode="InPlace" ShowFooter="true"
                                     horizontalalign="NotSet" AllowPaging="True" DataKeyNames="Detail_GUID" >
                        <Columns>
(column telerik:control definitions)
                        </Columns>
                        <EditFormSettings>
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                </telerik:RadGrid>
Antonio Stoilkov
Telerik team
 answered on 25 Sep 2013
4 answers
73 views
Hello,
I am trying to follow the tutorial at http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx
Below is the applicable code as to where I think the issue may be. Anyone have any ideas why the grid does not even display any data when I load the page.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGridSmears">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGridSmears"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
 
<telerik:RadGrid ID="RadGridSmears" runat="server" CellSpacing="0"
    DataSourceID="SqlDataSourceSmears" ShowStatusBar="True"
    AutoGenerateColumns="False" PageSize="3" AllowSorting="True"
    AllowPaging="True" GridLines="None" AllowAutomaticDeletes="True"
    AllowAutomaticUpdates="True" OnItemUpdated="RadGridSmears_ItemUpdated"
    OnItemDeleted="RadGridSmears_ItemDeleted">
 
    <PagerStyle Mode="NumericPages"></PagerStyle>
    <MasterTableView DataSourceID="SqlDataSourceSmears" DataKeyNames="SampleNo" AllowMultiColumnSorting="True"
        Width="100%" CommandItemDisplay="Top" Name="Smears">
        <DetailTables>
            <telerik:GridTableView DataKeyNames="AnalysisNo"
                DataSourceID="SqlDataSourceAnalysis" Width="100%"
                runat="server" CommandItemDisplay="Top" Name="Analysis">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="SampleNo" MasterKeyField="SampleNo">
                    </telerik:GridRelationFields>
                </ParentTableRelation>
...blah...blah
 
<asp:SqlDataSource ID="SqlDataSourceAnalysis" runat="server" ConnectionString="<%$ ConnectionStrings:XConnectionString %>"
    DeleteCommand="DELETE FROM [Analysis] WHERE [AnalysisNo] = @AnalysisNo AND [AnalysisDateTime]=@AnalysisDateTime"
    SelectCommand="SELECT * FROM [Analysis] WHERE [SampleNo] = @SampleNo" UpdateCommand="UPDATE [Analysis] SET [AnalysisDateTime] = @AnalysisDateTime, [AlphaCPM] = @AlphaCPM, [BetaCPM] = @BetaCPM, [InstrumentIDAlpha] = @InstrumentIDAlpha WHERE [AnalysisNo] = @AnalysisNo">
     <SelectParameters>
        <asp:Parameter Name="SampleNo" Type="String"></asp:Parameter>
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="AnalysisNo" Type="Int32"></asp:Parameter>
        <asp:Parameter Name="AnalysisDateTime" Type="DateTime"></asp:Parameter>
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="AnalysisDateTime" Type="DateTime"></asp:Parameter>
        <asp:Parameter Name="AlphaCPM" Type="Int32"></asp:Parameter>
        <asp:Parameter Name="BetaCPM" Type="Int32"></asp:Parameter>
        <asp:Parameter Name="InstrumentIDAlpha" Type="String"></asp:Parameter>
        <asp:Parameter Name="AnalysisNo" Type="Int32"></asp:Parameter>
    </UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSourceSmears" runat="server" ConnectionString="<%$ ConnectionStrings:XConnectionString %>"
    DeleteCommand="DELETE FROM [Smears] WHERE [SampleNo] = @SampleNo"
    SelectCommand="SELECT * FROM [Smears] WHERE [SampleNo] = @SampleNo" UpdateCommand="UPDATE [Smears] SET [Station] = @Station, [SampleDate] = @SampleDate, [BagNo] = @BagNo WHERE [SampleNo] = @SampleNo">
    <SelectParameters>
        <asp:Parameter Name="SampleNo" Type="String"></asp:Parameter>
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="SampleNo" Type="String"></asp:Parameter>
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="Station" Type="String"></asp:Parameter>
        <asp:Parameter Name="SampleDate" Type="DateTime"></asp:Parameter>
        <asp:Parameter Name="BagNo" Type="Int32"></asp:Parameter>
        <asp:Parameter Name="SampleNo" Type="String"></asp:Parameter>
    </UpdateParameters>
</asp:SqlDataSource>
Princy
Top achievements
Rank 2
 answered on 25 Sep 2013
4 answers
162 views
Hello, I have this code in cs

           var imagePath = Server.MapPath("myPath");
                  System.Drawing.Image image = System.Drawing.Image.FromFile(imagePath);
                  using (var stream = new System.IO.MemoryStream())
                  {
                      image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
MyRadBinaryImage.Width = 525
                     MyRadBinaryImage.Height = 613;
                     MyRadBinaryImage.DataValue = stream.ToArray();
                  }
 and this in aspx
<telerik:radbinaryimage  id="MyRadBinaryImage" runat="server" alternatetext="BinaryImage"  width="525" height="613" resizemode="Fit"  ClientIDMode="Static"></telerik:radbinaryimage>

now I would like to save a copy of the image on the server, how can I do?
Konstantin Dikov
Telerik team
 answered on 25 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?