Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
84 views
Frankly I'm asking this one only because I'm curious.  

I have a fairly conventional RadGrid set up with edit links on each row.  Each link calls a JavaScript function which in turn causes an editing screen popup.  

The link elements look like this:  
<a id="ctl00_MainContent_RadGrid1_ctl00_ctl04_EditLink" href="#" onclick="return EditForm('14001','0');">Edit</a>

I also have a span at the top of the page that displays "Welcome" logged in person.  Somehow someone messed up the users table and the name field included characters within double quotes.  As such, for example, the field would be rendered like this:
  <span id="lblFullName" style="color:Blue;">Welcome Joe "***" Smith</span>

When this happened, the JavaScript function started crashing. The function got the correct parameters but this line started crashing.
 var oWnd = window.radopen("EditForm.aspx?Id=" + Id, "Edit Item " + Id); 

When I put a catch in there, the error was Cannot read property 'open' of undefined.

Naturally the practical solution to this problem was to purge the database of bad data but I'd still like to know what happened.

 
Kostadin
Telerik team
 answered on 02 Oct 2014
1 answer
67 views
When I use the advanced form (adapted from the demo on this site) to add extra fields to the admin form I have a problem.  With this in place I find that if I try and access a RadWindow on the form load it only works on rare occasions.

When I remove the <telerik:RadScriptReference Path="AdvancedForm.js" /> line from the script manager the radwindow works - although obviously the advanced form functionality then fails.

Any suggestions on what maybe happening here.  My code for finding the radwindow is shown below 

var oWnd = $find("<%=uxFilterRadWindow.ClientId %>");
oWnd.show();

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 02 Oct 2014
1 answer
84 views
we are using rad grid in one of our project. I have a small issue. In the rad grid  . I use jquery to select and deselect all check boxes in Rad Grid. This works fine. My problem is with paging. I am using default paging behaviour of RadGrid. The problem is that on when i select page index 2 or any other index then  select and deselect all check boxes in Rad Grid.  is not working     i want to do this  through jquery  or javascript    i do want use code behind like toggle 

Pavlina
Telerik team
 answered on 02 Oct 2014
1 answer
158 views
Hello, 
I am trying to preload the full images retrieved from a database and bound to the ImageGallery control to cache the images in the browswer and help improve our user experience using javascript. 

I have tried access the image url by getting the RadImageGalleryItems collection and then call get_imageUrl for each item in the array on the OnImageGalleryCreated client-side event.  I can see that there is a ThumbnailUrl associated with each item when I debug in the browser but the ImageUrl is empty.  However, when I click on a Thumbnail image it makes a call to retrieve the full image with a unique imgid which is different than the imgid used for the smaller Thumbnail image. 

Is there a different way to access the full image Url for each Thumbnail?  I've read all the documentation related to the RadImageGallery client-side objects but still can't figure out how to make this work correctly.

thanks,
Min
Antonio Stoilkov
Telerik team
 answered on 02 Oct 2014
1 answer
72 views
hi,
 
i have a RadGrid showing some data and i'm using a formtemplate, a user can edit any item to view it's contents is there any way to print the edited item only ?


thanks
Eyup
Telerik team
 answered on 02 Oct 2014
1 answer
1.7K+ views
I can do this in a normal asp grid but I do not know how to achieve the same with radgrid.

In a asp grid I add nested grids like this:

<asp:TemplateField>
    <ItemTemplate>
        <asp:GridView ID="secondLevelGrid"  runat="server" AutoGenerateColumns="false" CssClass="ChildGrid" OnRowDataBound="secondLevelGrid_OnRowDataBound">
                    <Columns>
 
                        <%--My new nested  grid goes here--%>
 
                        <asp:BoundField DataField="Id" HeaderText="Id" />
                        <asp:BoundField DataField="Code" HeaderText="Code" />
                        <asp:BoundField DataField="Quantity" HeaderText="Q.ty" />
                        </Columns>
            </asp:GridView>
    </ItemTemplate>
</asp:TemplateField>

How do I make the above in a radgrid considering that I have 7 level nested grids?

protected void firstLevelGrid_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        GridView firstLevelGrid = e.Row.NamingContainer as GridView;
        string code = firstLevelGrid.DataKeys[e.Row.RowIndex].Value.ToString();
        GridView secondLevelGridView = e.Row.FindControl("secondLevelGrid") as GridView;
        secondLevelGridView.DataSource = //GetData
        secondLevelGridView.DataBind();
    }
}
How do I make the equivalent of the OnRowDataBound for each nested grid in RadGrid?

Thanks for helping. If someone could please show me how to achieve the above in RadGrid then I will add the additional six level nesting I need. Thanks
Pavlina
Telerik team
 answered on 02 Oct 2014
3 answers
88 views
Hello,
I'm trying to implement the use of a GridBinaryImageColumn + GridBinaryImageColumnEditor to automatically manage the upload of an image into a RadGrid-
Data comes from custom classes, images come from a blob field in db and are rendered properly in grid; however, when I edit the record and try to upload a new image, my  GridBinaryImageColumnEditor always tells it cannot find any uploaded file.

My grid:

<telerik:RadGrid ID="grdLinee" runat="server" AutoGenerateColumns="false" AllowAutomaticUpdates="false" AllowSorting="true" AllowPaging="true" PageSize="10"
                OnNeedDataSource="grdLinee_NeedDataSource" AllowAutomaticInserts="true" AllowAutomaticDeletes="false" OnItemCommand="grdLinee_ItemCommand" OnSelectedIndexChanged="grdLinee_SelectedIndexChanged"
                AllowFilteringByColumn="false" MasterTableView-EditMode="InPlace" ShowHeader="true" ShowFooter="true" ShowStatusBar="true" Skin="Office2007">
                 <PagerStyle Mode="NextPrevAndNumeric" />
                <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
                    <Selecting AllowRowSelect="true" />
                </ClientSettings>
                <MasterTableView DataKeyNames="idCatalogoLinee" CommandItemDisplay="Top">
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton" ConfirmText="Sei sicuro?" />
                        <telerik:GridBinaryImageColumn DataField="immagine" UniqueName="immagine" ResizeMode="Fit" DataType="System.Byte"></telerik:GridBinaryImageColumn>
//...

Code:

protected void grdLinee_ItemCommand(object sender, GridCommandEventArgs e)
        {
 switch(e.CommandName)
{
   case "Update":
 GridBinaryImageColumnEditor editor = (GridBinaryImageColumnEditor)item.EditManager.GetColumnEditor("immagine");
//editor.RadUploadControl.UploadedFiles.Count here is always 0
//...
}
}


I don't get any error in itemcommand, but always get 0 files   (and editor.UploadedFileContent.Length=0). The same update command is working properly with other database fields, which I can update: what am I missing to properly handle file upload?
Thanks for any hint,
al.

Maria Ilieva
Telerik team
 answered on 02 Oct 2014
3 answers
118 views
I am quite lost with this.
I have a radgrid that has auto generated columns. The user selects an item from a drop down list and the grid load the selected table.
The tables have all the same DB structure: Id-Code-Description-Bla....Bla-Sub.
If the filed "Sub" contains the value "yes" means that the Code has is own table and is not a  single item. So there are rows representing single items and rows  representing another table.

<telerik:RadGrid ID="RadGrid1" runat="server" Culture="it-IT" AllowPaging="True" AllowSorting="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
                <ExportSettings ExportOnlyData="True">
                    <Pdf PageWidth="">
                    </Pdf>
                </ExportSettings>
                <ClientSettings>
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                </ClientSettings>
                <MasterTableView CommandItemDisplay="Top" DataKeyNames="Code" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                    <CommandItemSettings ShowExportToExcelButton="True" />
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton">
                            <HeaderStyle Width="30px" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn ButtonType="ImageButton" Text="Delete" CommandName="Delete" FilterControlAltText="Filter column1 column" ConfirmDialogType="RadWindow" ConfirmText="Do you really want to delete this project and all its content?" UniqueName="Cancel">
                            <HeaderStyle Width="30px" />
                        </telerik:GridButtonColumn>
                    </Columns>
 
                    <EditFormSettings>
                        <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
                    </EditFormSettings>
                    <PagerStyle AlwaysVisible="True" />
                </MasterTableView>
                <PagerStyle AlwaysVisible="True" />
            </telerik:RadGrid>

How can I auto generate the nested grid if the filed value of "Sub" in any row  is "yes"?
Thanks for supporting,
Felice
Pavlina
Telerik team
 answered on 02 Oct 2014
3 answers
401 views
I am trying to restrict users entering Regular Expression value like  <%^>/   in RadComboBox while typing  but it throws error message "Object doesn't support this property or method" 

I want to validate it while typing in RadComboBox.

function OnClientKeyPressing(sender, args) {
if(checkRegEx())      // checking the RegEx value, if pass then proceed else remove the last character entered  
                    {
// Proceed.......
}
else
{
args.set_cancel(true);  // ERROR : Object doesn't support this property or method 

}                
            }




<telerik:RadComboBox ID="rcbMonthEndDate" Runat="server" TabIndex="5"
DropDownWidth="100px" MarkFirstMatch="true" AllowCustomText="true" EnableLoadOnDemand="false"
   HighlightTemplatedItems="true" OnClientKeyPressing="OnClientKeyPressing" 
   NoWrap="true" EmptyMessage="Select Date" AutoPostBack="False"
   Enabled="true" Width="100px"    
   DataTextField="MonthEndDate" DataTextFormatString="{0:yyyy-MM-dd}" 
   DataValueField="MonthEndDate">
   <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem, "MonthEndDate", "{0:yyyy-MM-dd}")%>
                                </ItemTemplate>
<ExpandAnimation Type="OutBounce" />
<CollapseAnimation Type="InBack" />                            
  </telerik:RadComboBox>



Nencho
Telerik team
 answered on 02 Oct 2014
3 answers
232 views
Hi,

I've created a custom skin and embed all resource in an assembly.
All is loaded properly in the aspx page.
In my solution, I only reference Telerik.Web.UI and CustomSkin assemblies, I did not reference Telerik.Web.UI.Skins.

When debugging the aspx page in IE through F12,..

I saw that for ImageGallery's Next Button for example,..

background-image: none
   .RadImageGallery : none
   .RadImageGallery : url('/xxx/xxx/WebResource.axd?d=xxxxx&t=xxxx')    <== this is striked-out

The first .RadImageGallery (none value) is coming from Telerik.Web.UI assembly (Telerik.Web.UI.Skins.ImageGallery.css)

The second .RadImageGallery (WebResource.axd value) is coming from the CustomSkin assembly, but is overridden by the first .RadImageGallery from Telerik.Web.UI assembly

As such, the image of the Next button is not shown.

Question is, if I have a ASP.NET Theme with a Skin File of :

<telerik:RadImageGallery runat="server" EnableEmbeddedSkins="false" Skin="TelerikRadControl" RenderMode="Lightweight" />


why is Telerik.Web.UI.Skins.ImageGallery.css still being loaded / part of the css ?

shouldn't the CustomSkin assembly be the only one loaded into the page?

Thanks,
Henry


Galin
Telerik team
 answered on 02 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?