Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
94 views
I trying to implement radasyncupload control inside radgrid.

I declare the upload control like:

<telerik:GridTemplateColumn DataField="usrSignature" EditFormColumnIndex="0"
HeaderText=
"<%$ Resources:Localization, usrSign%>"UniqueName="usrSignature">
    <ItemTemplate>
        <telerik:RadBinaryImage runat="server" ID="rb"
        DataValue='<%#Eval("usrSignature") is DBNull ? null : Eval("usrSignature")%>'
        AutoAdjustImageControlSize="false" Height="30px" Width="100px"
        AlternateText="<%$ Resources:Localization, NoSignature %>" />
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadAsyncUpload ID="raupSignature" runat="server"
        AllowedFileExtensions="bmp,gif,jpg,jpeg,png" MaxFileInputsCount="1" />
    </EditItemTemplate>
</telerik:GridTemplateColumn>

I trying to validate that when UploadedFiles.Count == 0 i send a DBNull to database, and if UpladedFiles.Count > 0 i send the image uplaoded.

if (usrSignature.UploadedFiles.Count > 0)
    scmQuery.Parameters["@usrSignature"].Value = DBNull.Value;
else
    {
    UploadedFile file = usrSignature.UploadedFiles[0];
    byte[] fileData = new byte[file.InputStream.Length];
    file.InputStream.Read(fileData, 0, (int)file.InputStream.Length);
    scmQuery.Parameters["@usrSignature"].Value = fileData;
    }

This it's fine, but if i upload a file, then i delete the uploaded file, when i proceed to submit the record, I detect that UploadedFiles.Count = 1

I need to know how can decrease the UploadedFiles.Count every time when i delete a uploaded file.

I found a similar problem in the post: RadAsyncUpload does not clear uploaded files.

I'm using the version Q1 2010, and i need to find a solution for this problem.

NOTE: I found a similar problem in your Upload / Using RadAsyncUpload in an Ajaxified Grid example. If you add a image, then you delete the image, and then you proceed to add the record, One row in the grid it's deleted. If you repeat the operation to upload and delete more files, then produce a error.

I appreciated your time and your answer.

Regards,
Felipe Meléndez.
Felipe de Jesús
Top achievements
Rank 1
 answered on 27 May 2011
2 answers
209 views
Folks using VS 2010 SP1 with Rad Controls for ASP.Net Ajax 2011. I am below link as prototype. But unlike the below link I have 1 Master and 1 detail table.

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/declarativerelations/defaultcs.aspx

My intention is for example if CustomerID column value is 'ALFKI' in parent Table then hide Freight (A GridTemplateColumn in my actual scenario) Data in Detail Table, else show Frieght Column data in Detail Table. So far I come up with this in Radgrid Prerender event but strugling to get a referrence to hide the Detail Table column.

protected void RadGrid1_PreRender(object sender, EventArgs e)  
    {  
        foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)  
        {  
            if (dataItem.Expanded)  
            {  
                // Need Help here to Conditionally Hide Detail Table Freight Column
                     //  if Column Value CustomerID  of Parent Table =  'ALFKI'.
                    
            }  
        }   
    }

Thanks

gc_0620
gc_0620
Top achievements
Rank 1
 answered on 27 May 2011
5 answers
194 views
Hi,

I have radconfirm window on blur of Date control. OK button gets the focus on confirm window, when i press tab, the focus goes to Cancel button. If i press tab again, the focus goes to parent page first control (here it is RadioButtonList) and allowing to navigate through radio buttons.

Does anyone know how to tab between Ok and Cancel buttons on confirm window.

I am using Confirm template to do this.
Here is my code:

<TelerikWeb:RadWindowManager ID="Singleton" runat="server" Skin="Vista">
      <ConfirmTemplate>
            <div class="windowpopup radconfirm">
                <script type="text/javascript">
                    function RadWindowManager_SetFocus(obj, ev)
                    {                               
                        if (!ev) ev = window.event;               
                        if (ev.keyCode == 9)
                        {                                   
                            if (obj.nextSibling)
                            {
                                obj.nextSibling.focus();
                            }
                            else if (obj.previousSibling)
                            {
                                 obj.previousSibling.focus();
                            }
                        }                               
                     }
               </script>

             <div class="dialogtext">
                {1}
                </div>
                <div>
                   <a onclick="$find('{0}').callBack(true);" class="radwindowbutton" href="javascript:void(0);"
                                    onblur="RadWindowManager_SetFocus(this, event);">
    <span class="outerspan">
    <span class="innerspan">##LOC[OK]##</span> </span></a>
     <a onclick="$find('{0}').callBack(false);" originalAttribute="href" originalPath="javascript:void(0);"
                                    onblur="RadWindowManager_SetFocus(this, event);">
    <span class="outerspan">
    <span class="innerspan">##LOC[OK]##</span> </span></a>
     <a onclick="$find('{0}').callBack(false);" originalAttribute="href" originalPath="javascript:void(0);"
                                    onkeypress="RadWindowManager_SetFocus(this, event);">
    <span class="outerspan">
    <span class="innerspan">##LOC[OK]##</span> </span></a>
     <a onclick="$find('{0}').callBack(false);" originalAttribute="href" originalPath="javascript:void(0);"
                                    onkeypress="RadWindowManager_SetFocus(this, event);">
    <span class="outerspan">
    <span class="innerspan">##LOC[OK]##</span> </span></a>
     <a onclick="$find('{0}').callBack(false);" class="radwindowbutton"
                                            href="javascript:void(0);" originalAttribute="href" originalPath="javascript:void(0);" originalAttribute="href" originalPath="javascript:void(0);" originalAttribute="href" originalPath="javascript:void(0);" onblur="RadWindowManager_SetFocus(this, event);">
    <span class="outerspan">
    <span class="innerspan">##LOC[Cancel]##</span> </span></a>
                  </div>
              </div>
       </ConfirmTemplate>
</TelerikWeb:RadWindowManager>


for some reason tab keypress event is not firing the function. But it get firing for any keypress.

I would appreciate any help I can get with this.

-Vishal

Randall
Top achievements
Rank 2
 answered on 27 May 2011
2 answers
58 views
Hi guys,

I have a "Line Chart" with 1 series inside. The X-Axis items are the months of the year like, Oct, Nov, Dec etc. and Y-Axis items are some numeric values.

The PointMarks start in the middle of the columns but I want them to overlap with Grid Lines so they must shift half column width to the (<<) left  direction. (The first point must start from X=0)

I checked the forum pages but could not find an appropriate way for that. Can you please help me to find a way to shift them without damaging the structure of the line chart ?

P.S. Please see the attachment..

Thanks,
Ervin  
ervin
Top achievements
Rank 1
 answered on 27 May 2011
1 answer
77 views
I am trying to use the RadRating component in a Customer Survey tool I am creating.  Are there any resources available that I can see to help me in understanding how to setup my database for using the RadRating and also in querying my database to provide an overall RadRating for my customer surveys?

Thanks.

Matt
Gimmik
Top achievements
Rank 1
 answered on 27 May 2011
4 answers
84 views
How do I show caption inside the image (or it could be outside) for each image?
Amber
Top achievements
Rank 1
 answered on 27 May 2011
3 answers
102 views
Can someone show me how to set focus on the "Select" button in the RadUpload object?


Robert
Top achievements
Rank 1
 answered on 27 May 2011
1 answer
253 views
Hi guys,

I'm suddenly getting an error like this :

Resolution of the dependency failed, type = "Telerik.Sitefinity.Configuration.ConfigManager", name = "XmlConfigProvider".
Exception occurred while: Calling constructor Telerik.Sitefinity.Configuration.ConfigManager(System.String providerName).
Exception is: ResolutionFailedException - Resolution of the dependency failed, type = "Telerik.Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionManager", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The type ExceptionManager cannot be constructed. You must configure the container to supply this value.
-----------------------------------------------
At the time of the exception, the container was:


  Resolving Telerik.Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionManager,(none)


-----------------------------------------------
At the time of the exception, the container was:


  Resolving Telerik.Sitefinity.Configuration.ConfigManager,XmlConfigProvider
  Calling constructor Telerik.Sitefinity.Configuration.ConfigManager(System.String providerName)


when trying to get the connection string, anyone else got the same error?
It used to work fine, but since this morning I've been getting this, I did not upgrade of anything.

The line where the code gives the error is:
Telerik.Sitefinity.Configuration.ConfigManager cfgManager = Config.GetManager();

I also tried :
string a = Config.Get<DataConfig>().ConnectionStrings[ "Sitefinity" ].ConnectionString;

Please help!!

Thanks in advanced!

Vlad
Telerik team
 answered on 27 May 2011
2 answers
240 views
Hi All,

Anyway I can remove this "300 items in 10 pages" text from the pager programatically (like I can for PageSizeComboBox etc)

Thanks,
Matt
Matt
Top achievements
Rank 1
 answered on 27 May 2011
3 answers
195 views

Index.aspx contains a RadtabStrip and RadMultiPage.  From Index.aspx, I am trying to call a JavaScript function found in selected PageView's content, which is another ASPX page.  My JavaScript in Index.aspx that is trying to make the call to Page VIew looks like this (saveData is the function in the child ASPX page):

 

 

 

 

var multiMain = $find("<%= mulMain.ClientID %>");

 

 

 

 

var pageToSave = multiMain.get_selectedPageView();

 

 

 

 

var pageContent = pageToSave.get_element();

 

 

pageContent.saveData()

 

;

Obviously, I can't get this to work.  I can see from the examples that you can change style information, among a number of other things, but it appears that I'm doing so for the immediate container of the child ASPX (an iframe), and not for the ASPX page itself.

Does anyone have any idea how to pull this off, how to call the JavaScript of an ASPX page contained within a Page View of RadMultiPage?

 

Bruce
Top achievements
Rank 1
 answered on 27 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?