Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
304 views
Is it posible to assign 2 datakeys to grid?

DataKeyNames

 

 

="CheckovID" ????? and "groupID"

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Sep 2013
1 answer
139 views
I have the following code to save the attachments in a folder outside the DB.
Line 5 is giving me troubles during the creation of new records because the value to assign to "recordID" at the time of creation of a new record does not yet exist.



protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem edititem = (GridEditableItem)e.Item;
            GridEditableItem editedItem = e.Item as GridEditableItem;
                string recordID = editedItem.GetDataKeyValue("TransazioneID").ToString();
                string subPath = "Allegati\\" + recordID;
                bool isExists = System.IO.Directory.Exists(Server.MapPath(subPath));
                if (!isExists)
                    System.IO.Directory.CreateDirectory(Server.MapPath(subPath));
                RadUpload upload = (edititem.EditManager.GetColumnEditor("columnAllegati") as GridAttachmentColumnEditor).RadUploadControl;
                upload.TargetFolder = "Allegati\\" + recordID;
 
            }
        }
So my idea is to add a condition on top of this method that would execute it only if a new record is not being created. Something along those lines.....
How can I do something like that? 
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Sep 2013
2 answers
240 views
Hi all,

I would like to fire a javascript confirm popup when the user wants to change page (by setting a page number or by using previous / next page buttons).

Here is a quick description of the grid :

A user can update some input fields in a grid and a button below the grid lets the user save the values. I would like to prevent him from losing its updated data when he changes page by displaying a javascript confirm popup.

The confirm popup will ask if he really wants to change page and if it is the case, we lauch the postback and we change page. If not, the page change event is canceled and the user can save its values.


Thanks
TANSERI
Top achievements
Rank 1
 answered on 11 Sep 2013
6 answers
252 views
I have a hierarchical Telerik RadGrid that sometimes contains child entries that are empty. For these, I want to overwrite the default text "No child records to display" with something user locale specific.

So I can do this:

       
<telerik:RadGrid ID ="SettingsGrid" ... /><br>
            <mastertableview ... /><br>
                <DetailTables><br>
                    <telerik:GridTableView ... /><br>
                        <asp:Label ID="NoRecordLabel" runat="server" Text="whatever"/></div></NoRecordsTemplate>


Which causes the text "whatever" to appear when it should.

But I obviously want to do this dynamically, but I have failed in both of two ways:

1) By referencing my .resx file in the .ascx file. I import it's namespace and reference a certain resource as such:

    Text="<%$ Resx:SiteTextResources.Globals_Close %>"

(This works in other files in the same solution)

But this only produces empty text.

2) I haven't been successful at retrieving the Label programatically from the code behind. I looked at this: http://www.telerik.com/community/forums/aspnet-ajax/grid/how-to-access-controls-in-norecordstemplate.aspx but didn't get that approach to work, as I just can't seem to find the Label. I get an OutOfBoundsException, which I guess means the GetItems() method returns null.

Any ideas? Would appreciate it a lot!
C
Top achievements
Rank 1
 answered on 11 Sep 2013
1 answer
448 views
Hello,
We are trying Radgrid for our project requirements we have a specific requirement to disable selection of certain rows based on "True/False" values returned from a column in database. We want to have functionality to disable those rows for which a specific column is returning "False" and we want to enable this feature with hierarchy .
We tried going for Template field, GridSelectColumn and tried using "Selectable.Mode to None" but we were not able to achieve the results and we need a client side solution /using some inbuilt property for our problem as our grid would hold around 1 million records so handling such scenario on server side/codebehind is the scenario we want to avoid.
Kindly reply to suggest some ways /features we can achieve our requirement. We have enquired for professional license so we will be getting professional license this week , so please help us on achieving this requirement.


Thanks& Regards,
-Dinesh Kotwani

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Sep 2013
1 answer
90 views
Hi

Is it possible to change the number of time slots as well as time slot duration of a radscheduler?  If possible how?
Needha
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2013
1 answer
74 views
I have a problem when trying to localize SPRadEditor control. I am changing language but it stays English anyway.
Telerik.Web.UI: Version=2013.2.717.35
RadEditorSharePoint: Version=6.7.1.0
 My actions:
Add telerik control to my cutom web part, change Language property to "de-DE":
<telerik:SPRadEditor ID="ContentInputTextBox" Language="de-DE" OnClientLoad="RadEditorLoad" CssClass="articleformcontrolfull" runat="server"><CssFiles><telerik:EditorCssFile Value="~/EditorContentArea.css" /></CssFiles></telerik:SPRadEditor>

Add language property to ConfigFile.xml and ListConfigFile.xml in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.7.1.0__1f131a624888eeed\Resources folder:
<property name="Language">de-DE</property>

Deploy. After all those actions language for all elements stays English and don't changes.
What I am missing here? Or what I am doing wrongly? Thank you for your help.


Ianko
Telerik team
 answered on 11 Sep 2013
1 answer
116 views
hi there,

i have a problem finding the listview through javascript. it always returns null.
also i get an error on setting datasource : function not known.
i just included the 3 dll's in my bin folder. Serverside was working

javascript:
function pageLoad() {
    var listview = $find("rlvProducts");
    console.log(listview);
    listview.set_dataSource(products);
    listview.dataBind();
}

aspx:
<telerik:RadListView ID="rlvProducts" CssClass="test" runat="server">
                <ClientSettings>
                    <DataBinding ItemPlaceHolderID="iphProducts">
                        <LayoutTemplate>
                            <ul id="iphProducts">

                            </ul>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <li>#= id #</li>
                        </ItemTemplate>
                    </DataBinding>
                </ClientSettings>
            </telerik:RadListView>

also i followed this guide:
http://blogs.telerik.com/aspnet-ajax/posts/12-02-06/client-side-databinding-with-radlistview-for-asp-net-ajax---part-1.aspx
Konstantin Dikov
Telerik team
 answered on 11 Sep 2013
7 answers
333 views
Hi

I want my web users to select only .jpg/.png files to be uploaded and set the AllowedFileExtensions property and found that it works rarely because of some browser limitations. So If the user selects an invalid file, I want to display an alert and bring the control back to its original state instead of displaying the selected file as an invalid one.( The one shown as Red). Please help.

Thanks
Dona.
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2013
4 answers
311 views
Hi,

I have a radgrid that I want to remove some items  based on data on item databound. There were several computation happening on serveral columns in item databound. If the computed value of that record is equal to zero, it should no longer show. Any info on how can I accomplish this one..

Thanks in advance,
RJ
Princy
Top achievements
Rank 2
 answered on 11 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?