Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
360 views
I have a very basic problem in setting the width of the grid on clientside. The reason i need to set the width on client side is to decide width based on screen resolution. Everything is fine with this and I can set the width by this code piece

function gridCreated()
{

var

 

screenDivHeader = (l_screenWidth - 17);

 

 

sender.get_element().style.width = l_screenWidth +

"px";

 

 

sender.get_element().getElementsByTagName(

"div")[0].style.width = screenDivHeader + "px";

 

 

sender.get_element().getElementsByTagName(

"div")[1].style.width = l_screenWidth + "px";
}

This is working perfectly and i have no problems with that. The problem is when we have no scrollbars and grid is less than the screen width. Now i want to shrink the grid to its orginal contents and dont want it to be 100% expanded. When i do that I got the header and table of the grid out of allignment as attached in the screenshot. Please note, if I remove this line from the master page

 

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 


I used this javascript code to shrink the grid to original contents, this is metnieond in your forums.

sender.MasterTableView._element.style.width =

"";

 

 

sender.get_element().style.width = sender.MasterTableView._element.offsetWidth +

"px";

 



2) Second problem is that when i dont set the grid's width on server side and only set it on client side and if the scrollbar appears due to client side width setting, the frozen columns wont work. Please give me a workaround for that as well.

Your immediate response is highly appreciated.

Thanks and Regards
Venelin
Telerik team
 answered on 24 Jul 2013
9 answers
111 views
Editor-Document Manager: right to left support in IE 8,9, 10

Open the document manager and select on of the files.
Then you can notice in the file description, that there is a big space between the labels and the text-boxes.

*See the attached screenshot.

Thanks
Ianko
Telerik team
 answered on 24 Jul 2013
3 answers
119 views
I have been tasked with a portion of a product in which I think I have a solution but need a little assistance with the code design. I will describe the architecture and if you could provide some sample code in your reply that would be great. We do have the 2013 RAD AJAX Controls.

What I want to do is have a RadGrid work as a repeater control and have each row contain a RadEditor. Now, the grid will start with one empty row displayed which will allow for text to be entered. So far so good. Now, as soon as the user pastes an image, below the text, into the editor control I want a small radwindow popup to display (or hidden panel with the radio buttons on it as part of the row display) with a radio button list so the user can select the kind of image (i.e. House, Car, Boat) that was pasted in the that row's editor. After the user selects the kind of image and closes the radwindow then a new row should be inserted into the radgrid below the previously inputted row. After this new row with a fresh radeditor is displayed the user just repeats the process typing in text until the next image is pasted below the text and at that point it just repeats, a radwindow opens (or hidden panel part of the row), they select the kind of image (i.e. House, Car, Boat), then close the radwindow and have a new grid row display again. Like I stated, it may be better to have a hidden panel with radio buttons display and not have a pop up radwindow display. This is the part I am unsure of and maybe you can help me decide here as well. 

Also, at some point I will have to allow for rows to be deleted or inserted.

Can you guy's give me a simple code sample that will allow me to do this. This customer represents a big contract.

Thanks,

Steve Holdorf
lovehans@nc.rr.com
holdorfs.ctr@jdi.socom.mil
Antonio Stoilkov
Telerik team
 answered on 24 Jul 2013
1 answer
86 views
Hi,


We are using Rad control Version Q2,2013.We have noticed that there are no option available in filtering option for Numeric columns to find out TOP10/TOPn columns and BOTTOM10/BOTTOMn columns.

This will be very helpful. We hope that this will be implemented in next version of Telerik controls.


Thanks

Rajib
Maria Ilieva
Telerik team
 answered on 24 Jul 2013
7 answers
354 views
Hi,

I am looking for a way to cancel the ItemCreated and ItemDatabound event in case of exception.

The situation is as follows; I use these events to create a dynamic edit form from code behind when the user issues a grid EditCommand and to fill e. g. Comboboxes from data sources. In case of an exception I want to be able to intercept/undo the process of the edit form creation and revert the grid back to normal display mode.

As ItemCreated and ItemDatabound do not use e.Canceled I look for a different way of doing this.

Thank you

Nic
Soeren
Top achievements
Rank 1
 answered on 24 Jul 2013
3 answers
208 views
I have a page that contains a RadGrid.  One of the columns contains a hyperlink in an edit template as so:

    <telerik:GridTemplateColumn HeaderText="Asset Name" FilterControlAltText="FilterAssetName">
        <ItemTemplate>
            <asp:HyperLink ID="hplEditAsset" runat="server" ForeColor="Blue" AutoPostBackOnFilter="true"></asp:HyperLink>
        </ItemTemplate>
    </telerik:GridTemplateColumn>

I'm loading the data through a webservice, so I'd like to bind data to the grid on the client side. I'm trying to access the hyperlink in a javascript function as follows:

    function gridRowBound(sender, args) {
       var row = args.get_item()
       var link = $telerik.findElement(row , 'hplEditAsset');
       var d = args.get_dataItem();

       link.innerHtml = d.Url;
       link.outerHtml = d.UrlDescription; 
    } 

The data being bound to the grid is in the form of List<MyDataRow>, and MyDataRow has properties named Url and UrlDescription.

When I run the code, row is set to "tr#ctl00_MainContent_QuickScanGrid_ctl00__0.rgRow" according to Firebug. However, the script fails on the next line and link is never set.

How do I access that element so that I can bind the hyperlink to the data on the client side?
Steven
Top achievements
Rank 1
 answered on 24 Jul 2013
3 answers
236 views
Hi,
I am trying to find my RadTabStrip client side and then work with it in javascript. But when I use the $find() method, it just returns null. 

Here's something like what I'm doing:
function tabStripManipulation{
    var tabStrip = $find('<%= this.myTabStrip.ClientID%>');
    if (!tabStrip) {
        return;
    }
    var tab = tabStrip.findTabByText("Document");
    // do more stuff here....
    ...
}

Whenever the method checks to make sure that tabStrip is not null, it fails and returns.

What am I missing here?
Shinu
Top achievements
Rank 2
 answered on 24 Jul 2013
1 answer
110 views
Good Day 

i have exactly the same problem specified here  http://www.sitefinity.com/developer-network/forums/general-discussions-/ajaxcontroltoolkit-javascript-resource-not-including-after-4-1-upgrade 

I have attached my example code 

Example Project

how can i resolve this ? 
Maria Ilieva
Telerik team
 answered on 24 Jul 2013
1 answer
69 views
We are using a custom skin in our application. I want to show indicators on dragging of tab to new position to reorder.

If i use telerik skin "Silk" by default indicators are visible. How to implement this in  custom skin scenerio. 
Please see the attached image.

 <telerik:RadTabStrip runat="server" ID="tbTabs"   Align="Left"   EnableDragToReorder= "true" Skin="customSkin"  EnableEmbeddedSkins="false" />
Magdalena
Telerik team
 answered on 24 Jul 2013
1 answer
86 views
i need the button insert external vídeo with the other default buttons also,
so i put the toolname in the toolsfile.xml then when the rad editor loads i got a js error saying access denied, if i make it by code directly it resets the toolbar buttons
Rumen
Telerik team
 answered on 24 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?