Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
50 views
Hi, im building a forum like website with 3 tables, (Topics, Threads & Messages). iv got 3 forms with the same names. I would like to pass the primary key of one table (Topic) on the 1st form to link up with the relevant Threads on the Threads form. Here is my code below on the topics form.

 <Columns>
        <telerik:GridHyperLinkColumn DataTextField="Name"
            DataNavigateUrlFields="TopicID" 
            DataNavigateUrlFormatString= "Threads.aspx?TopicID={0}" ItemStyle-Font-Bold="true" />
        <telerik:GridHyperLinkColumn DataNavigateUrlFields="TopicID" 
        DataNavigateUrlFormatString="Threads.aspx?TopicID={0}" HeaderText="Topic" />
  </Columns>

The primary key does get passed as i can see it in the address bar but how do i retrieve it on the threads form?

Thanks in advance
Katlego
Top achievements
Rank 1
 answered on 18 Jun 2011
1 answer
98 views
Hello All,

My one of client had licensed version of Telerik Version 2007.2.1107.0.

In new version of telerik controls we have below attribute.

EnableEmbeddedSkins ="false"

any one have any idea how to stop style coming from web resource in Telerik Version 2007.2.1107.0.?

Thanks,
Kalpesh
Kalpesh V
Top achievements
Rank 1
 answered on 18 Jun 2011
1 answer
98 views
I need to find a control that's contained in a Template column when I get into a RowDrop event.  The control is in the DraggedItem object, and is always null.  Any suggestions?

 Dim index As Integer = CInt(e.DraggedItems(0).ItemIndex)
 Dim oList As DropDownList = CType(RadGrid1.Items(index).FindControl("oList"), DropDownList)
 Dim s As String = oList.SelectedValue

Thanks,
Alex
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2011
7 answers
404 views
Hi All,
     I have one radgrid in that i have checkboxes,raddatepicker and radnumerictextbox.
     Attached is the screenshot of my radgrid.
    When i select raddatepicker i need to fill Percent complete radnumerictextbox with 100,completed checkbox checked
    and 99% complete checkbox uncheck and visible false on client side only.

 aspx page
 -----------------
<
telerik:RadGrid ID="RadGrid1" Skin="WebBlue" runat="server" AllowFilteringByColumn="true"
                    AutoGenerateColumns="false" ShowStatusBar="True" GridLines="None"
                    AllowPaging="true" PageSize="20" AllowSorting="True" onitemdatabound="RadGrid1_ItemDataBound">
                <MasterTableView GroupLoadMode="Client">
               <Columns>
                     <telerik:GridTemplateColumn UniqueName="Complete" HeaderText="Completed" AllowFiltering="false">
                        <ItemTemplate>
                            <asp:Panel ID="Panel1" runat="server" Width="2px">
                                <asp:CheckBox ID="chkComplete" runat="server"/>
                            </asp:Panel>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                     <telerik:GridTemplateColumn UniqueName="gridActFinish" HeaderText="Actual Finish" AllowFiltering="false">
                     <ItemTemplate>
                       <telerik:RadDatePicker ID="actfinish" runat="server" Width="100px" MaxDate='<%# Convert.ToDateTime(Eval("early_start_display")).ToString("dd/MMM/yyyy") %>'
                       Calendar-ShowOtherMonthsDays="false" Calendar-ShowRowHeaders="false" DbSelectedDate='<%# Bind("actual_finish") %>' DateInput-DateFormat="MM/dd/yyyy">
                       <ClientEvents OnDateSelected ="actfinish_OnDateSelected" >
                       </ClientEvents>
                       </telerik:RadDatePicker>
                     </ItemTemplate>
                    </telerik:GridTemplateColumn>
                  <telerik:GridTemplateColumn UniqueName="perComplete" HeaderText="99% Complete" AllowFiltering="false">
                        <ItemTemplate>
                            <asp:Panel ID="Panel2" runat="server">
                                <asp:CheckBox ID="Chkbox" runat="server"/>
                            </asp:Panel>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="perComplete" HeaderText="Percent Complete" AllowFiltering="false">
                     <ItemTemplate>
                       <telerik:radnumerictextbox id="pct" runat="server" text='<%#Eval("pct") %>' minvalue="0" maxvalue="100" width="50px" FocusedStyle-BackColor="Yellow" NumberFormat-DecimalDigits="0">
                           <numberformat allowrounding="true" decimaldigits="4"/> 
                       </telerik:radnumerictextbox>
                     </ItemTemplate>
                    </telerik:GridTemplateColumn>
                       </Columns>
                </MasterTableView>
                </telerik:RadGrid>

  javascript
  --------------------------
  function actfinish_OnDateSelected(sender, args) {

               var rdgrid = $find("<%=RadGrid1.ClientID %>");
               var cell = sender.get_element().parentNode.parentNode;
               var index = cell.parentNode.rowIndex;
               var MasterTable = rdgrid.get_masterTableView();
               var row = MasterTable.get_dataItems()[index - 3]; //getting row
               var tbxAdopted = row.findControl("pct").set_value(100); //getting value of TextBox 'tbxAdopted'
               var checkbox = row.findControl("chkComplete");
               checkbox.checked = true;
           }
 in this action i am successfully filling value 100 in radnumerictextbox but i can't check the checkbox.

Thanks in advance, Please help me this senario on client side only.

Thanks,
Nagendra.
Nagendra
Top achievements
Rank 1
 answered on 18 Jun 2011
1 answer
262 views
How can I display an htmlcode inside a colum?

I have this:

<telerik:GridDropDownColumn
                                                    UniqueName="elementocostosrowid"
                                                    DataField="elementocostosrowid"
                                                    HeaderText="Categoria -<br />Elemento Costos" DataSourceID="sqlElementoCosto" ListTextField="dummy2"
                                                    ListValueField="rowid" SortExpression="elementocostosrowid"
                                                    DropDownControlType="DropDownList">
                                                </telerik:GridDropDownColumn>
 
 
<asp:SqlDataSource ID="sqlElementoCosto" ConnectionString="<%$ ConnectionStrings:GolosaNETConnectionString %>"
                                        ProviderName="System.Data.SqlClient" SelectCommand="SELECT a.rowid,b.descripcion + '[' + CONVERT(varchar(5),b.categoria)+']<br />' + a.descripcion + '[' + CONVERT(varchar(5),a.elementocostos)+']' as dummy2 FROM tbl01ElementoCostos a, tbl01ElementoCostosCategoria b WHERE a.elementocostoscategoriarowid=b.rowid" runat="server">
                                    </asp:SqlDataSource>

I need to render the "<br />" tag generated by the sqldatasource. I see the text <br /> in the grid, instead of the break.
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2011
2 answers
129 views
Hi,
I am using VS 2010.I am new to this (AJAX RAD Controls/AJAX RAD Charts).I am having an xml file having 3 tables.Now my requirement is to plot a Stacked bar Chart dynamically retrieving values from different tables.Kindly help me out.

I have retrive values from different table into One Datatable named "ValuesToDisplay"

05:30  06:00  06:30  07:00  07:30  08:00  08:30  09:00  09:30  10:00  10:30 
01       02       01       04       04        02     03        04       03         05     01       
02        04       01      04       05        03     01        04       01         01     02       
03        03       02      02       01        04     02        02       03         05     04      
Now on X-axis should be the Time(ie 05:30 ......) and on Y-axis the values(ie 1 2 ...).Graph should be in this format

10|
9  |               ___
8  |               |      |
7  |               |  3  |
6  |    ___     |___|
5  |    |      |    |      |                           and so on ......................
4  |    | 3   |    |  4  |    ___
3  |    |___|    |      |    |  2  |
2  |    |  2  |    |___|    |___|
1  |    |___|    | 2   |    |_1_|
0  |__|_1_|__|___|__|_1_|_________________________________________
        05:30   06:00   06:30  07:00 07:30 08:00 08:30 09:00 09:30 10:00 10:30  
Stefen
Top achievements
Rank 1
 answered on 17 Jun 2011
1 answer
111 views
I got this error when I create a Radtextbox control in my page.

Script control 'txtRechazoComentarios' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl


My aspx goes like:
<telerik:RadMultiPage ID="rmpTabs" runat="server" SelectedIndex="0">
    <telerik:RadPageView ID="rpvSolicitud" runat="server">
        ...
        <telerik:RadAjaxPanel ID="rapAutorizaRechaza" runat="server">
            <asp:Panel ID="PanelAutorizaRechaza" runat="server" Visible="false">
                ...
                <telerik:RadTextBox ID="txtRechazoComentarios" runat="server" Visible="true" TextMode="MultiLine" Width="98%" Height="98%" >
                    <ClientEvents OnLoad="MostrarTxtRechazo" />
                </telerik:RadTextBox>
                ...
            </asp:Panel>
        </telerik:RadAjaxPanel>
        ...
    </telerik:RadPageView>
</telerik:RadMultiPage>


and the scripts:
function MostrarTxtRechazo() {
            var rechazo = document.getElementById('hdnRechazar');
 
            if (rechazo != null && rechazo.value == 1 && (TieneInnerHTML('<%= lblErrorMotivo.ClientID %>') || TieneInnerHTML('<%= lblErrorPassword.ClientID %>'))) {
                MostrarElemento('lblRechazoComentarios');
                MostrarElemento('divRechazoComentarios');
            }
        }


I already tried the RegisterWithScriptManager="false" property, but hen I got some weird error saying:
Microsoft JScript runtime error: Object doesn't support property or method '$'
at Telerik.Web.UI.WebResource.axd
var d=$telerik.$(a);

can you guide me through this?
thanks

-E
Edith
Top achievements
Rank 1
 answered on 17 Jun 2011
20 answers
771 views
We use rad numeric text boxes in a web application that switches culture based on the user.
Everything works fine except the key under the 3 on the keypad is a point "."  and the rad numeric textbox won't take it as the decimal separator (comma in French) when the culture if in French.  I have been shown that in Excel it switches it to a comma.  Everything else related to the other Rad Controls react exactly as expected in the French culture. Does anyone have any recommendations on how to deal with this?
Any suggestions would be greatly appreciated.
Thanks,
Jeff
Stefano
Top achievements
Rank 1
 answered on 17 Jun 2011
0 answers
90 views
In the code-behind I am attempting to see what the "bind" value is for Text='<%#Bind("firstname") %>'.  The answer I am looking for in the example is "firstname". 
I know there has to be a way of accessing that value so any ObjectDataSource or other binding method can be used for setting that value when the RadTextBox is displayed or updated.
You may ask why?  I am attempting to create a generic way to pre-set values when inserting by using the Bind attribute/property's value.

I hope I made myself clear
Thanks
Kelly
Kelly Harris
Top achievements
Rank 1
 asked on 17 Jun 2011
6 answers
277 views
The following represents the grid I am trying to construct:

DateReceived    DateShipped           Days
01/20/2011             NULL                      30
04/01/2011          04/15/2011               15
04/10/2011          04/12/2011                 3
01/15/2011          04/2/2011                   2

Columns one and two are populating successfully from my SqlDataSource.  No problem there.  Column three is intended to be a calculated value that displays the number of active days for a given date range.  For example, if the given start date was 4/1/2011 and the given end date was 4/30/2011, we would calculate 30, 15, 3 and 2 for the four rows in the grid.  That's because the first data record row represents an item that was received in January and has not been returned.  Therefore it was held for the entire 30 days of the month of April, 2011.  The next rows are self-explanatory.

To capture the date range I have a RadComboBox for month and another for year.

To summarize, my question is how do I implement an expression for column three to calculate the correct number of days? I'm happy to do this server side or client side.

*Note: I'm using mm/dd/yyyy notation.
Daniel
Top achievements
Rank 1
 answered on 17 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?