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

 Hi Team,

 

I don't want to display the expand/collapse icon if the child grid doesn't contain values.

It should display only the child grid has rows.

 

Thanks,
Rajesh

 

  Protected Sub Parts_DetailTableDataBind(sender As Object, e As GridDetailTableDataBindEventArgs) Handles Parts.DetailTableDataBind
Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
Dim obj As New AutoComplete()
Select Case e.DetailTableView.Name
Case "ComponentDetails"
Dim InventoryID As Integer = CType(dataItem.GetDataKeyValue("InventoryID"), Integer)
e.DetailTableView.DataSource = obj.GetComponentItems(InventoryID)
End Select
End Sub
Rajesh
Top achievements
Rank 1
 answered on 16 Sep 2015
6 answers
596 views
NB. I am posting this self-answered post because I could not find a solution in the forum. Hopefully it will be useful to someone else.

I spent *way* too many hours trying to debug this scenario: I have a GridTemplateColumn with a RadButton as a toggle button. I could not get the toggle button state back from the edit form for the insert and update commands for the life of me. The longer it took to solve, the simpler I knew my error had to be. Unfortunately, I could not find any examples in the demos--they all use simple column binding.

My problem ended up being in my SQL data source: I had declared my "boolean" field as an "int" instead of a "bit". By fixing this, the two way binding worked as desired.

Here is a snippet of my code, with just the RadButton in the template column (there are other controls in my actual application).

<telerik:GridTemplateColumn UniqueName="gtcName" HeaderText="Title">
  <ItemTemplate>
    <telerik:RadButton ID="rbOpen" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox" Checked='<%#Bind("isOpen")%>' Height="24" Width="48" ReadOnly="true">
      <ToggleStates>
        <telerik:RadButtonToggleState ImageUrl="iOpen.png" IsBackgroundImage="false" Value="1" Selected="true" />
        <telerik:RadButtonToggleState ImageUrl="iClosed.png" IsBackgroundImage="false" Value="0" />
      </ToggleStates>
    </ItemTemplate>
    <EditItemTemplate>
    <telerik:RadButton ID="erbOpen" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox" Checked='<%#Bind("isOpen")%>' Height="24" Width="48">
      <ToggleStates>
        <telerik:RadButtonToggleState ImageUrl="iOpen.png" IsBackgroundImage="false" Value="1" Selected="true" />
        <telerik:RadButtonToggleState ImageUrl="iClosed.png" IsBackgroundImage="false" Value="0" />
      </ToggleStates>
    </telerik:RadButton>
  </EditItemTemplate>
</telerik:GridTemplateColumn>


In the SQL data source, the column "isOpen" is declared like this, even though it is a "bit" in the SQL database:

<asp:Parameter Name="isOpen" Type="Boolean"/>
Hannah
Top achievements
Rank 2
 answered on 16 Sep 2015
3 answers
297 views
Hi,
I have a radgrid containing a radeditor per line.  The radeditor is set enabled and in previeuw mode.  I would like to add the toggle full screen button so the user can open the text in radeditor in fullscreen and R/O.

<telerik:RadEditor runat="server" ID="txtLogText" Enabled="false" EditModes="Preview" Height="140px" Width="1300px" ></telerik:RadEditor>

In attachment you can find a screen shot of the RadGrid so you can see that there is not  a lot space to see the content of the radeditor.  That's why we need the full screen modus.

Can you please help me?

Kind regards

Suzy
Suzy
Top achievements
Rank 2
 answered on 16 Sep 2015
1 answer
95 views

Hi,

    We've implemented a TabStrip with multiple tabs and content residing in PageViews of Multipage control. We would like to print all content from each pageview when a button is clicked. We want each pageview to be printed in a separate page. I tried selected pageview print from this

  It worked perfectly for selected views. I modified the code to append innerHMTL as shown below and i am getting 'undefined' as text in print instead of actual content. Is there a way to print multiple pages in one go irrespective of which tab is active? 

  function printPageView() {
                var myPageView = $find('<%= RadMultiPage1.ClientID %>');
                  var myIframe = document.getElementById('ifrmPrint');
                  var pvContent = "" // myPageView.get_pageViews().innerHTML;

                  var multiPage = $find("<%=RadMultiPage1.ClientID %>");
                  var i;
                  for (i = 0; i < myPageView.get_pageViews().get_count() ; i++) {
                     // alert(multiPage.get_pageViews().getPageView(i).get_id());
                      pvContent += multiPage.get_pageViews().getPageView(i).innerHTML;
                  }


                  var myDoc = (myIframe.contentWindow || myIframe.contentDocument);
                  if (myDoc.document) myDoc = myDoc.document;
                  myDoc.write("<html><head><title>title</title>");
                  myDoc.write("</head><body onload='this.focus(); this.print();'>");
                  myDoc.write(pvContent + "</body></html>");
                  myDoc.close();
              }

Mohammad
Top achievements
Rank 1
 answered on 16 Sep 2015
2 answers
166 views

I have an inline edit form on a radgrid. I am using the Glow skin and usually the textbox is black and the text is white, however both the text and textbox background colour are being rendered white for the inline edit form. How can I set the skin for the textboxes while in inline edit mode? The inline edit form is not specified I am using the automatic rendering.

Cheers

Caolan

Caolan
Top achievements
Rank 1
 answered on 16 Sep 2015
1 answer
333 views

I have some combo box whose values should be shown in gridview as the user clicks on submit button. Each time after filling the form, the data should be shown in grid view after pressing the submit button. How to write logic for this in code behind page

<telerik:RadAjaxPanel ID="mainpanel" runat="server">
    <table border="0" width="100%">
        <tr>
            <td>
                <telerik:RadTextBox ID="txtName" runat="server" Width="260px" TextMode="SingleLine" MaxLength="65" Style="text-transform: uppercase;"></telerik:RadTextBox>
                <telerik:RadTextBox ID="txtName" runat="server" Width="260px" TextMode="SingleLine" MaxLength="65" Style="text-transform: uppercase;"></telerik:RadTextBox>
                <telerik:RadTextBox ID="txtName" runat="server" Width="260px" TextMode="SingleLine" MaxLength="65" Style="text-transform: uppercase;"></telerik:RadTextBox>
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadButton ID="submit" Text="Confirm" runat="server" OnClick="confirm_Click" />                           
            </td>
        </tr>
    </table>
 
<telerik:RadGrid ID="gridConfirmSelection" runat="server" PageSize="100" AllowSorting="false" Width="100%"
AllowPaging="True" ShowGroupPanel="false" AutoGenerateColumns="false" GridLines="None" >
    <MasterTableView AutoGenerateColumns="false" AllowFilteringByColumn="false" ShowFooter="false" TableLayout="Fixed">
        <Columns>
            <telerik:GridBoundColumn HeaderText="Name"></telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn HeaderText="Address"></telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn HeaderText="Contact No." ></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

On pressing Confirm button the data should be shown in grid view. How to write logic for this in code behind page?
Viktor Tachev
Telerik team
 answered on 16 Sep 2015
1 answer
594 views
I have been looking at the demo with the auto complete ​functionality of the emails with the separator. It seems that if you select an email and separate it and add another email, you can select the exact same email again. For example this could be possible selection: aria@telerik.com, ann@telerik.com, christina@telerik.com, christina@telerik.com. Is there a way to prevent the entry from being selected again?
Nencho
Telerik team
 answered on 16 Sep 2015
4 answers
196 views

Hi,

how can I change the tooltip template of the tasks in gantt control. I didn't find a property and there seems no way to change the wrapped kendo gantt tooltip in javascript with widget.setOptions. Any idea?

 

Thx

Nencho
Telerik team
 answered on 16 Sep 2015
1 answer
451 views

m using Telerik UI for asp.net. Specifically I'm using RadTabStrip with partial page postbacks to allow the user to tab through different sets of data. When the user clicks a tab, some code executes and loads data just for that tab.

 

Some things I've tried that work for similar problems:

I've figured out how to execute codebehind: I set the OnTabClick property of the RadTabStrip, and then in codebehind I check what tab was clicked.
E.g.

protected void tab_Click(object sender, RadTabStripEventArgs e)

if (e.Tab.Text == "Info")

    { populateInfoTab();

}

private void populateInfotab()

{

    // Do some stuff

}

 

However, I can't figure out how to execute client side javascript after a specific tab is clicked. What I tried:
Set OnClientTabSelected property, and then add some javascript:

function tab_ClientClick(sender, args)

{

    var tab = args.get_tab();

    if(tab.get_text() == "Info")

    {

       alert("Tab Clicked");

    }

}

This works, BUT:  

The problem is that I need to set the InnerHtml of some div in the clicked pageview after it is clicked. I cannot do:

   some_div.InnerHtml = "test";

after the alert.

The div does not exist on page load (that specific RadPageView is hidden) so I cannot set it then. Once the user clicks into the tab, and after the page view loads, I need to be able to update the div's InnerHtml through JavaScript.
How would I go about doing this?

Ivan Danchev
Telerik team
 answered on 16 Sep 2015
3 answers
432 views

We are getting the following error -

 A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
------------- InnerException -------------
The network path was not found

when we use the codes as in the attachment . please help us how to give oracle-client connection String in vb for telerik report (trdx) file .

Stef
Telerik team
 answered on 16 Sep 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?