Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
133 views
Hi, I'm new to telerik so please bare with me if I did any silly mistake in my code. Basically what I'm trying to do is, I need to search data's from database from the input that user have given and list it in radgrid. Below are my codes, my datatable is having all the data that I need but when the datagrid are generated, its empty. Please guide me.

<asp:Panel ID="pnlSummary" runat="server" ScrollBars="Both" Visible='false'>
          <telerik:RadAjaxPanel ID="radSummary" runat="server" Height="200px" Width="300px">
                    <telerik:RadGrid ID="dgvSummary" runat="server" AllowPaging="true" AllowSorting="true" CellSpacing="0"
                            PageSize="7" Skin="Hay">
                              <MasterTableView />
                    </telerik:RadGrid>
          </telerik:RadAjaxPanel>
</asp:Panel>

Private Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
        Dim dt As New DataTable()
        With dt.Columns
            .Add("Num.")
            .Add("Staff ID")
            .Add("Name")
            .Add("Property")
            .Add("Department")
            .Add("Position")
            .Add("Average Mark")
            .Add("Final Mark")
        End With
 
        Dim intIndex As Integer = 1
        Dim strAverage As String = "0"
        Dim strFinalAverage As String = "0"
 
        For Each objView_EvalSummaryRow As DSHREval.HREvalRow In HREvalDALC.GetEvalSummary(Me.radDepartment.SelectedValue, Me.radPosition.SelectedValue, Me.txtStarYear.Text, Me.cboStarTerm.SelectedValue)
 
            dt.Rows.Add(New Object() {intIndex, objView_EvalSummaryRow.EmpID, objView_EvalSummaryRow.EmpName, objView_EvalSummaryRow.PropertyCode, _
                                           objView_EvalSummaryRow.Department, objView_EvalSummaryRow.PresentPosition, _
                                           strAverage, strFinalAverage})
 
            intIndex += 1
        Next
 
        dgvSummary.DataSource = dt
        Me.pnlSummary.Visible = True
End Sub
Fali
Top achievements
Rank 1
 answered on 11 Feb 2014
7 answers
700 views
How can I get the value of a datakey in the parent row on the client side if I click on a command item in my child radgrid?

I can do

var netID = sender.get_parent().get_masterTableView().get_dataItems()[0].getDataKeyValue("network_id");

but that always returns the first row in the parent gridview.  I need the data key value of the parent for the child grid command button click.  Ideas?



RadGrid code
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" AllowSorting="True"
      runat="server" GridLines="None" Width="95%">
      <MasterTableView DataKeyNames="network_id" ClientDataKeyNames="network_id">
          <NestedViewTemplate>
              <telerik:RadGrid ID="RadGrid2" DataSourceID="SqlDataSource2" runat="server">
                  <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="false" FileName="NetworkHorseblanketListExport" />
                  <MasterTableView CommandItemDisplay="Top">
                      <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="false" ShowExportToExcelButton="true"  />     
                  </MasterTableView>
                  <ClientSettings>
                      <ClientEvents OnCommand="OnCommand" />
                  </ClientSettings>                        
             </telerik:RadGrid>
          </NestedViewTemplate>
      </MasterTableView>
</telerik:RadGrid>

Javascript code:
function rgNetworkEquipment_OnCommand(sender, args)
{
   var cmd = args.get_commandName();
                     
   if (cmd == "ExportToExcel")
   {
      var parentRadGrid = sender.get_parent();
 
      // get the data key of the parent here
 
 
   }
}

Doug
Top achievements
Rank 1
 answered on 11 Feb 2014
5 answers
81 views
Hi,

I am facing an issue when inserting content in RadEditor:

I have the following sample text which is loaded from database into RadEditor:
<p>This is <span class="reComment reU0" title="RadEditorUser: Save Comment: Wednesday, October 09, 2013 3:35:22 PM" author="RadEditorUser" comment="Save Comment" timestamp="1381347322127">sample content </span>content <span style="background-color: yellow;">for first line</span>; and<br />
<br />
This is <span class="reComment reU0" title="RadEditorUser: Another Comment: Wednesday, October 09, 2013 3:40:12 PM" author="RadEditorUser" comment="Another Comment" timestamp="1381347612099">sample content </span>for the <span style="background-color: yellow;">second line</span> <br />
<br /></p>


Now I start making changes in RadEditor by entering some more text in between the above 2 lines:
Content entered between 2 lines

When switching to "Html" tab in RadEditor, it generates the following Html:
<p>This is <span class="reComment reU0" title="RadEditorUser: Save Comment: Wednesday, October 09, 2013 3:35:22 PM" author="RadEditorUser" comment="Save Comment" timestamp="1381347322127">sample content </span>content <span style="background-color: yellow;">for first line</span>; and<br />
<br />
<ins class="reU0" title="Inserted by RadEditorUser on Friday, January 31, 2014 5:48:07 PM" cite="RadEditorUser" timestamp="1391170687573"></ins><u><span style="color: #ff9933;">C<ins class="reU0" title="Inserted by RadEditorUser on Friday, January 31, 2014 5:48:08 PM" cite="RadEditorUser" timestamp="1391170688574">ontent entered between 2 lines</ins></span></u><br />
<br />
This is <span class="reComment reU0" title="RadEditorUser: Another Comment: Wednesday, October 09, 2013 3:40:12 PM" author="RadEditorUser" comment="Another Comment" timestamp="1381347612099">sample content </span>for the <span style="background-color: yellow;">second line</span> <br />
<br /></p>


Note here that "C" is considered as underline, and rest of the content "ontent entered between 2 lines" is considered as insert, whereas I have inserted all characters.

This causes an issue when the content is exported to Word format, since it omits the "C" as part of insert.

Can you please let me know the fix for this issue?

Thanks

Nikolay
Telerik team
 answered on 10 Feb 2014
14 answers
315 views
Hi,

Can anybody help me to achieve my goal.
I am inserting a link inside the radeditor. after that when I am right clicking on it, it opens a context menu saying open hyperlink. upon choosing it I fire OnClientCommandExecuting() event. But I am not able to get the hyperlink element inside the function.
I already used
selectedvalue = editor.getSelectionHtml();

but its returning empty string.

Can anybody help me on this????
Richard
Top achievements
Rank 1
 answered on 10 Feb 2014
3 answers
163 views
hello every one
i just stumbled ac ross Telerik tools this morning and i'm already impressed with it
my question is if i created a chart that bound to database that read from consumption meter every half an hour could i represent that in a chart using Telerik RadChart ?any help will be appreicated
P.S i'm novis when it come to creating chart but the documentation for RadChart is great
thank you in advance
Danail Vasilev
Telerik team
 answered on 10 Feb 2014
1 answer
225 views
Hallo,
i would like to make the masked textbox a little more "usable". What I mean is this. I've seen that by default you can escape empty characters with the space bars or just clicking the cursor at the point in the mask where you want to write. Sometimes by the  way, there are text (like IPs or phone numbers, or such) where the text is separated by literals and it would be great to use those literals to skip to the next box part, so much more intuitive in my opinion.
Pratical example.... for an IP mask you could have 255.255.255.255 but you could have as well 255.0.0.0 so each part, separated by the "." literal has a variable lenght.
It would be much more usable if we could skip to the next part pressing the literal "." so for example you enter 0 then press "." you are already set to the next 0.
The trick here would be to check the keypress, if it's not one of the allowed chars (this can be used both for numeric and text only masks) check for the first corresponding literal you find on the right of the cursor and move the cursor there.
So for phone number for example, here we have variable lenght so we can have +39-0737-12345678 but we can have as well +39-02-1234 so skipping with the "-" literal to the next part makes it much more usable. And this is for all variable lenght parts wich include numeric/alpha characters only.

Any hint on how to implement such functionality with JS? And do you think it would be a nice idea for a feature request? Some new option like SkipPartWithLiteral = "true" or such?

Thanks in advance
Massimiliano
Top achievements
Rank 1
 answered on 10 Feb 2014
4 answers
49 views
I'm using a RadEditor control with a custom toolbar. In Chrome and Firefox it displays fine, but in IE 10 the toolbar takes up an extra blank line. I tried using the default toolbar, but that displays a blank line as well. I've also tried switching the browser mode in IE to 7, 8, and 9, but get the same result.
Any idea what might be causing this?

Thanks...
Tim
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 10 Feb 2014
7 answers
73 views
Hello, i have a big problem!!!! i developed a web site and works fine until a year. It's full developed with telerik. The last month i implemented a new component on my site called jzebra or qz-print and that's jar file allows me print directly to the client zebra printer . BUT the problem is that RANDOMLY ocurrs that the panel updated with radajaxmanger is FREZZING. I see that when the user perform thee action, goto to the server and do all task,like insert, update, get data to refresh a radchar, get data to load radgrid, etc. but never updated the client i see the loadingpanel move but never finished, and not return an error, the only way to continue is refreshing page F5. This errors ocurrs on diferent places and is imposible to reproduce because is randomly.
Please i need help
Viktor Tachev
Telerik team
 answered on 10 Feb 2014
3 answers
117 views
Hi everyone, 

My problem is that i can change the skin to "Metro" of any Rad Control but i can't change the skin  of telerik:RadEditor.

Why?
Thanks, Bruno F.
Stef
Telerik team
 answered on 10 Feb 2014
1 answer
229 views
Can anyone inform me if there is a way to have a multiple series chart that is databound to a dataset that has two tables in it.  I need to be able to assign the ydatafield property of series A to table[A] column[B] and the ydatafield property of series B to table[B] column[B].  

Thanks for any help. 

Danail Vasilev
Telerik team
 answered on 10 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?