Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.3K+ views
I have a RadTimePicker that I would like to use 24 hour format on. I have the format in 24 hours, but when I click 13:00 it puts 1:00 p.m. in the box. How can I get it to put the 24 hour format in the box?

<telerik:RadTimePicker ID="ddlTravelStart"
    runat="server"
    TimeView-TimeFormat="HH:mm" >
</telerik:RadTimePicker>
K10
Top achievements
Rank 1
 answered on 08 Apr 2013
1 answer
85 views
As the below which is RadGrid method in client how to get user control in client, but recently I use treelist, i can not use same method for it. Please tell me how to find the checkbox element in javascript! thankss!!!

var grid = $find("<%= grdDetail.ClientID %>");
              var masterTable = grid.get_masterTableView();
              var rows = masterTable.get_dataItems();
                var i;
                for (i = 0; i < rows.length; i++) {
                    var rowResult = rows[i];
                        var textBoa= rowResult.findControl("textBoa");
                        var textBoc= rowResult.findControl("textBoc");
                        var Checkbox= rowResult.findElement("Checkbox");
                     }
Angel Petrov
Telerik team
 answered on 08 Apr 2013
2 answers
183 views
Hi Telerik Team,

When i add RadHtmlChart, I am faced the error
Unknown server tag 'telerik:RadHtmlChart'

then by following this link
http://www.telerik.com/community/forums/aspnet-ajax/htmlchart/unknown-server-tag-telerik-radhtmlchart.aspx
i updated the controls to newer version. then the RadHtmlChart works fine.

But now the problem is,
after updation, the itemCommand in the RadGrid are showing error.
here is my code.
protected void rgFiles_ItemCommand(object source, GridCommandEventArgs e)
   {
       int index = int.Parse(e.Item.ItemIndex.ToString());
       GridDataItem item = (GridDataItem)FileTable.MasterTableView.Items[index];
       item.Selected = true;
 
       row_id = int.Parse(item["id"].Text);
 
       string File_name = item["Name"].Text;
       Label2.Text = File_name;
       LiteralControl litCon = new LiteralControl();
       litCon.Text = "<iframe name='attachIFrame' id='runtimeIFrame'  frameborder='solid' word-wrap='normal' scrolling='auto' height='100%' width='400px'  src='RiskManagementStrategyFiles/" + File_name + "' style='left:0; background-color: beige;'></iframe>";
       Panel1.Controls.Add(litCon);
   }
visible property for id is "false" in .aspx page

Error
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 219:        item.Selected = true;
Line 221:        row_id = int.Parse(item["id"].Text);
Line 223:        string File_name = item["Name"].Text;

this error is solved, if we give visible property = "true" in .aspx page
SortExpression="id" UniqueName="id" Visible="true" HeaderStyle-CssClass="hide" ItemStyle-CssClass="hide">
------------------------
//CSS
.hide { display:none; }


but if i do like this, I have many RADgrids in my project. I need to change in all the grids.

(Again if i repalce the dll in Bin folder with the old dll, then the grid works fine but RadHtmlChart showing the same error)
Please help me....

Please give solution for this


Thanks in advance
--Alex

Alex
Top achievements
Rank 1
 answered on 08 Apr 2013
5 answers
915 views
Hello,

I have this radgrid that i want to perform edit funtion. Going into edit mode wasn't a problem.
But i can see the UPDATE and CANCEL buttons. here is my radgrid and i use datatable to populate it.
any suggestion?

 <telerik:RadGrid ID="RadGrid1" runat="server" ShowFooter="true" AutoGenerateColumns="False"
                    AllowSorting="true" EnableEmbeddedSkins="True" Skin="Sunset" Width="1000px"
                    EnableLinqExpressions="false" OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource1"
                    OnItemCreated="RadGrid1_ItemCreated">
                    <MasterTableView DataKeyNames="Account" EditMode="InPlace">
                        <Columns>
                            <telerik:GridButtonColumn Text="Edit" CommandName="Edit" ButtonType="PushButton">
                                <ItemStyle HorizontalAlign="Center" CssClass="BorderLeft BorderRight BorderBottom" />
                                <FooterStyle CssClass="BorderLeft BorderRight BorderBottom" />
                            </telerik:GridButtonColumn>
                            <telerik:GridBoundColumn DataField="LongAccount" HeaderStyle-HorizontalAlign="Center"
                                UniqueName="LongAccount" HeaderText="Account" ReadOnly="true" ShowSortIcon="false"
                                FooterText="Sub Total">
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" Width="100px" CssClass="BorderRight BorderBottom" />
                                <FooterStyle CssClass="BorderRight BorderBottom" />
                            </telerik:GridBoundColumn>
                         
                        </Columns>
                        <EditFormSettings>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableEmbeddedSkins="False">
                    </FilterMenu>
                </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 08 Apr 2013
1 answer
205 views
I want to change font-family of Titlebar of radwindow in javascript .
Princy
Top achievements
Rank 2
 answered on 08 Apr 2013
1 answer
172 views
I'm trying to figure out how to dynamically add columns to a hierarchical/nested grid in a RadGrid.  Which columns need to be created are determined by a Check Box List control.  And I only know for sure which columns to add after the RadGrid_DetailTableDataBind is called.

I can get it all to work if I set AutoGenerateColumns to TRUE.  But of course I need to make two of the columns (if they are selected) TemplateColumns.  Which is why I have to dynamically add the columns.

To me it looks like I have two choices (neither of which I could make work).   1) Add the columns to a statically created hierarchical grid.  Or 2) Create the hierarchical grid dynamically and then the columns.  

For the first option after the RadGrid_DetailTableDataBind is invoked, a datatable is populated from a database query. After the datatable (which is going to be the datasource) is generated I call the following routine (with datasource table as the one calling parameter).

Sub AddColumnsToGrid(ByVal ResultTable As DataTable)
    Dim bc As GridBoundColumn
     
    Dim dgOSEvent As GridTableView = RadGrid1.MasterTableView.DetailTables(0)
    dgOSEvent.Columns.Clear()
    'Dim dgOSEvent As GridTableView = New GridTableView(RadGrid1)
     
    bc = New GridBoundColumn()
    bc.DataField = "% of Total"
    bc.HeaderText = "% of Total"
    bc.ItemStyle.HorizontalAlign = HorizontalAlign.Center
    bc.DataFormatString = "{0:p}"
    dgOSEvent.Columns.Add(bc)
 
    bc = New GridBoundColumn()
    bc.DataField = "Count"
    bc.HeaderText = "Event Count"
    bc.ItemStyle.HorizontalAlign = HorizontalAlign.Center
    bc.DataFormatString = "{0:###,###,###}"
    dgOSEvent.Columns.Add(bc)
     
    For Each dc As DataColumn In ResultTable.Columns
        If dc.ColumnName <> "COUNT" And dc.ColumnName <> "% of Total" Then
            If dc.ColumnName = "SOURCE" Or dc.ColumnName = "DESTINATION" Then
                Dim tc As GridTemplateColumn = New GridTemplateColumn()
                tc.HeaderTemplate = New DataGridTemplate(ListItemType.Header, dc.ColumnName)
                tc.ItemTemplate = New DataGridTemplate(ListItemType.Item, dc.ColumnName)
                tc.ItemStyle.HorizontalAlign = HorizontalAlign.Center
                dgOSEvent.Columns.Add(tc)
            Else
                bc = New GridBoundColumn()
                bc.DataField = dc.ColumnName
                bc.HeaderText = dc.ColumnName
                If dc.ColumnName = "Description" Then
                    bc.ItemStyle.HorizontalAlign = HorizontalAlign.Left
                Else
                    bc.ItemStyle.HorizontalAlign = HorizontalAlign.Center
                End If
                dgOSEvent.Columns.Add(bc)
            End If
        End If
         
    Next
End Sub

I can post the code for DataGridTemplate, but I don't think that's the problem here.  I suspect that I'm getting something more fundamental wrong. 

The results I get when running this code is I do get a grid row for each record in my results.  Their headers are blank and the contents of the GridBoundColumn are: System.Data.DataRowView.  The template columns are blank.

My attempt at the 2nd approach was even less successful.  So I'll need more direction if this turns out to be the best way to go.

Thanks for any help on this.


Shinu
Top achievements
Rank 2
 answered on 08 Apr 2013
5 answers
389 views
Hello,

We are working on a healthcare application using the RadEditor.  Can we add medical terms to an existing or custom dictionary file to be used in the RadEditor control?  I found an article included below.

www.telerik.com/help/aspnet-ajax/editor-create-new-dictionary.html

Thank you.

Eric
Rumen
Telerik team
 answered on 07 Apr 2013
1 answer
58 views
Hi all member
I have a Radgrid .I want with press a special key perform a action like Cancel.So I create a KeyPress method for grid but when in method raise cancel Insert or cancel edit method it cause fire  validator in template column. and show a error javascript.
please help to me for resolve this problem.(Note: I want not use KeyboarNavigationSupport in radgrid)
thanks.
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Apr 2013
1 answer
144 views
Hi, 
I'm developing a client mail application, When i place RadEditor inside the Update Panel I'm unable to read the content of the editor, when placed outside the update panel i can able to get the content.

Please help/assist me in this regards


Thanks & Regards
Phaneendra
Rumen
Telerik team
 answered on 06 Apr 2013
0 answers
125 views

I have noticed when I use code like 

var oWnd = $find("<%= RadWindowActionNotes.ClientID %>");

The VS 2012 ability to collapse code sections breaks...

Image 1 - collapseWorks.jpg- Works in regular JavaScript code...
Image 2 - collapseNotWork -  Broken with $find

Does anyone know how to get this working??

Wired_Nerve
Top achievements
Rank 2
 asked on 06 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?