Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
Hi
i saw your example related with Get data and total items count in a single request. but in my case i m not using any services. I am using .net 4.0 i have more than 50k data, I am accessing data using my dynamic stored procedure.i want to bind data in my grid. How can i do this.i m requesting u attached solution so i can use in my application.

Mira
Telerik team
 answered on 18 Nov 2011
1 answer
116 views
Does RadUpload not work in a user control (.ascx)?   CaseFile.UploadedFiles.Count is always 0.  Any help would be greatly appreciated.  KR

Code Behind
protected void AttachmentCase_AddClick(object sender, EventArgs e)
{
    CaseAgentActions.CaseOpenFile attachment = new CaseAgentActions.CaseOpenFile();
 
    // Attach the file referenced to upload.
    if (CaseFile.UploadedFiles.Count > 0)
    {
        foreach (UploadedFile item in CaseFile.UploadedFiles)
        {
            attachment.Filename = item.FileName;
            byte[] attachmentBytes = new byte[item.InputStream.Length];
            item.InputStream.Read(attachmentBytes, 0, attachmentBytes.Length);
            attachment.FileData = attachmentBytes;
            page.oCaseOpen.Files.Add(attachment);
        }
    }
 
    AttachmentsGrid.Rebind();
}

.ASCX

<telerik:RadUpload ID="CaseFile" runat="server" InitialFileInputsCount="3" MaxFileInputsCount="10" Width="400px"></telerik:RadUpload>
<asp:Button ID="AddFileButton" runat="server" Text="Add File" OnClick="AttachmentCase_AddClick"
Width="120px" CssClass="Case_Search_Button" Font-Bold="true" Font-Size="10px"
Height="20px" CausesValidation="false" />

Bozhidar
Telerik team
 answered on 18 Nov 2011
4 answers
187 views
Hi...
I created a user control which has a rad ComboBox and RadCallBack.
ComboBox displays customer name and when i select a customer, with the help of RadCallBack, execution transfers to code behind and customer details are extracted from DB.
then those details are filled in combo boxes.

when I have 1 instance of this user control on a page, it works fine, but when I add another instance, I can see customer names in the dropdown, but those textboxes are not filled. I can debug and see that those code behind lines are executed but i do not see any results in my text boxes.

Any help would be appreciated.

here is the code:



// this is java script code called when a customer is selected in rad combobox

function CustomerSelectedChanged() {

                var comboBox = <%= cmbLookUp.ClientID %>;

               

                var CustomerCode = comboBox.GetValue();

                //document.getElementById("<%=txtFrom.ClientID %>").value = 'manik';

                  <%=rdCallBackCustDetails.ClientID%>.MakeCallback('GetCustomerDetails',CustomerCode);

                 

 

            }

' this is code behind

 

Private Sub RadCallback1_Callback(ByVal sender As System.Object, ByVal args As Telerik.WebControls.CallbackEventArgs) Handles rdCallBackCustDetails.Callback

 

        If args.CallbackEvent = "GetCustomerDetails" And args.Args <> "" Then

 

            Try

 

 

                MakeControlsUpdatable()

 

               

                Dim CustomerData As New FreightComDN.cls_Customer(ConfigurationManager.AppSettings("FreightConStr"))

                Dim resultcol As Collection

                Dim CustomerCode As String

 

                CustomerCode = args.Args

 

                resultcol = CustomerData.getASpecificCustomer(args.Args)

 

                SetText(Me.txtFrom, resultcol.Item(1).customerName)

 

                CustomerData = Nothing

            Catch ex As Exception

 

            End Try

 

       

            End If

 

 

        End If

    End Sub

 

Private Function MakeControlsUpdatable()

        Try

            ' set all the controls to be updated

            rdCallBackCustDetails.ControlsToUpdate.Add(Me.txtFrom)

 

        Catch ex As Exception

 

        End Try

    End Function

 

Private Sub SetText(ByVal txtBox As TextBox, ByVal txtValue As Object)

        Try

            txtBox.Text = txtValue

        Catch ex As Exception

        End Try

 

    End Sub

Ivana
Telerik team
 answered on 18 Nov 2011
7 answers
294 views

Hello,

I have an ASP.NET page that contains a standard asp:Label at the top of the page in order to display a page title. Below the page title, there are 2 RadGrid controls. The first grid displays parent records that are stored in a database. When an item is selected in the first grid, the second grid is then populated with child records (stored in the same database). This all works fine.

Because there is a 2 - 3 second wait after selecting an item in the first grid and the time it takes to populate the second grid, I have added a RadAjaxLoadingPanel to my ASP.NET page. This is the first time that I have used a LoadingPanel, so I have followed a Telerik demo as a guide for configuring the LoadingPanel.

When I now open my ASP.NET page and click on an item in the first grid, the LoadingPanel appears for about 3 seconds, and then everything on the page disappears, except for the title at the top of the page. Both grids are gone; neither of them are visible on the page. What would cause this to happen? I have double and triple-checked the settings of my LoadingPanel, comparing them to the settings shown in the Telerik demo (http://demos.telerik.com/aspnet-ajax/ajax/examples/loadingpanel/loadingimages/defaultcs.aspx). I have also googled this issue for help, but I cannot determine what I am missing.

Has anyone seen a problem like this and how do I resolve the problem?

Thank you,
Steven

Maria Ilieva
Telerik team
 answered on 18 Nov 2011
5 answers
98 views
How do I remove the "today" link in monthview?

Also if anyone knows how to make month display full month (November instead of Nov) that would be cool too.

Thanks,
Dan
Peter
Telerik team
 answered on 18 Nov 2011
8 answers
252 views
We are using a masterpage which has a RadMultiView, and then in each RadPageView, we load a user control (.ascx), which is all controlled by a RadTabStrip (probably doesn't matter). Now, assuming a scenario where each user control would only speak with itself, what would be the best solution, having one master RadAjaxManager in the master page, or having separate RadAjaxManagers in all user controls? And why?

In alternative 1, we would really wrap in the entire RadMultiView in an updatepanel, in alternative 2, only the controls in each user control.
Alternative 1 would of course make the whole user control update, alternative 2 would allow more detailed control, but unless you have complex pages with lots of controls (perhaps just a RadGrid in each with a filteroption), the difference all togheter might not be all that large after all?

What would be the advantages/drawbacks of each solution?

You could make the question more complex by introducing RadAjaxManagerProxy, but in alternative 1, I guess that wouldn't really make that much of a difference would it, since the entire user control would update anyway? We have experimented a bit with this alternative 3 with a proxy and a radajaxmanager in the master, but then we get a strange problem - when we have a buttonClick_event call myRadGrid.Rebind() after modifying data, we can see that the DataBinding() event of the RadGrid is triggered, the Select is executed in the database....but the contents of the RadGrid isn't updated. Strange.

Maria Ilieva
Telerik team
 answered on 18 Nov 2011
9 answers
182 views
Hi,
We have a requirement where once the user hides or unhides the column OR resize  the column width, these settings must be remembered for that user.
Kindly let us know if this can this achieved.

Thanks,
Sudha.
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Nov 2011
4 answers
217 views
Hi friends,
I have used RadGrid with id="gvWeblunchMenuItems" in a webpage.In this i have implemented gridTemplate column as follows,

<telerik:GridTemplateColumn AllowFiltering="False" ShowFilterIcon="False" HeaderText="Edit Assigned Schools"   UniqueName="TemplateColumn1" FilterControlWidth="30px">
<ItemTemplate>
   <telerik:RadComboBox ID="rcschools" runat="server" Height="150px" Width="150px" DropDownWidth="200px"            Text=" -  Select Schools - " HighlightTemplatedItems="true"  MarkFirstMatch="true"
EnableLoadOnDemand="true" Visible="true" OnClientFocus="OnFocus" EnableViewState="true"  ToolTip="Create" EmptyMessage="select" OnClientDropDownClosing="">
      <ItemTemplate>
            <table width="150px" border="0" cellspacing="1" cellpadding="0">
                 <tr>
                      <td align="left" width="50px"><asp:CheckBox runat="server" ID="chk1" Checked="false" /></td>
                      <td align="left" width="150px"><asp:Label ID="lblSchoolname" runat="server" Text='<%#Eval("SchoolName")%>'></asp:Label>
                        <asp:HiddenField ID="hdAvailableSchoolID" runat="server" Value='<%#Eval("Id") %>' /></td>
                 </tr>
               </table>
       </ItemTemplate>
       <FooterTemplate>
            <center><asp:ImageButton ID="imgbtnAssign" ImageUrl="~/image/save_btn.gif"  runat="server" OnClick="imgbtnAssign_click" /></center>
       </FooterTemplate>
            </telerik:RadComboBox>
</ItemTemplate>
</telerik:GridTemplateColumn>


in the above when i click on imgbtnAssign( imagebutton in footer template) i am getting AjaxLoading panel.
Ajax setting i have written are....

  <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="gvWeblunchMenuItems">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gvWeblunchMenuItems" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="imgbtnAssign">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gvWeblunchMenuItems" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

here my problem is, i am getting loading panel only  once when i click  on imagebutton in footer template .On next time i am not getting..

i don't know why its like that...

plese help me..

Thaks & Regards
Anwar
Anwar
Top achievements
Rank 2
 answered on 18 Nov 2011
3 answers
245 views

Are using the

<script type='text/javascript'>
Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; }
</script>
, but since our AsyncUpload is dynamically made visible or not we get an errormessage when its not visible:

Error: Unable to get value of the property 'Modules': object is null or undefined

Isn't there a global setting we can use that disables it without getting the js-error. That would save us from dynamically adding this script depending on whether the asyncupload is visible or not on a lot of pages?
Helen
Telerik team
 answered on 18 Nov 2011
1 answer
125 views
I am having a GridTemplateColumn with a checkbox that is  being dynamically created. I  need to have this checkbox with an ability to AUTOPOSTBACK but the autopostback event never seems to fire. The browser does not fire the event consistently and also even when it fires the event handler is never reached.

Looks like it is a bug in Telerik RadGrid as this post http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-with-dynamic-columns-gridtemplatecolumn-dynamic-control-events-not-firing.aspx shows.

Is there a workaround or fix for the same?
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Nov 2011
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?