Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
110 views
I have been operating on the assumption that all I had to do create a RadAlert from server side was to call RadWindowManager1.RadAlert("Message", 500, 200, "Another Message", "");

This has worked fine on several complex pages in my project.  
I've also created a bare minimal test page and it's worked perfectly there as well.
All the pages have much the same settings and controls (RadScriptManager, RadWindowManager, etc.)

I have this other page with an identical call within a Radbutton click event.  When I do it from there I get a 
Script controls may not be registered before PreRender crash.

There is nothing particularly exotic about this page. It's just another postback event.  

What could possibly be going wrong?

Sorry.  Found it.  Bad call to unrelated controls in the Prerender.
Boris
Top achievements
Rank 1
 asked on 12 Apr 2013
0 answers
86 views
Sorry. Cancel this post.  Wrong assumptions.
Boris
Top achievements
Rank 1
 asked on 12 Apr 2013
1 answer
103 views
I'm using a radGrid in a user control. The user control has a client-side API (so it can be used more than once on the same page). Due to this, I cannot specify a client-side OnGridCreated event handler declaratively, since the same function would be called for multiple occurrences of the grid. In my client-side component's initialize event the grid does not exist yet, so I cannot attach handlers there, but if I go for the pageLoad event, the grid has already been created, and the gridCreated event fired, so it's too late to attach to it. Any suggestions on how/when I can attach this event successfully?
Jeanne
Top achievements
Rank 1
 answered on 12 Apr 2013
14 answers
437 views
Why is it that the whole RadMultiPage control has to be updated on postbacks? This seems horribly inefficient to me and such a waste of resources. Why is it that a single PageView within a RadMultiPage can't be set as an updated control within a RadAjaxManager? The only way it works is if I set the entire RadMultiPage as an updated control in my RadAjaxManager settings. This seems like such a waste. I have several PageViews which contain RadComboBox controls and those RadComboBox controls contain hundreds of items each. I'd like to load them from the database once up-front and have them just persist in ViewState on the client so that the Google Suggest-like filtering (i.e. MarkFirstMatch=true) will work super fast since it's all on the client. But, since you have the whole RadMultiPage control going back and forth the wire every single time there is an AJAX postback, the postbacks are very bloated. This means that I am basically being forced into using the server-side load-on-demand mechanism and doing a database pull each and every time the user starts to type in the comboboxes and return only the relevant results to the combobox. I'm OK with this, but I'd rather load the comboboxes once up-front and only have single PageViews updated when postbacks/callbacks occur. Please explain why this is so and what all my options are. Thank you. BTW, I do love your products...I'm just frustrated by this one limitation. It just looks what you are doing is applying class="rmpHiddenView" to hide the pageviews that are not currently being viewed.
Keith
Top achievements
Rank 2
 answered on 12 Apr 2013
2 answers
106 views
Hi,
I Have a page with a RadUpload control taht is working fine.

Now I would like to add a progress bar to show about the process that I'm doing with the information loaded from the uploaded file.

I'm receiving this message when I tried to just replicate the same code from the demo on that page:
RadUpload Ajax callback error. Source url returned error: 400
Bad Request
http://localhost:19562//Telerik.RadUploadProgressHandler.ashx?RadUrid=297095f2-2e7d-4479-94c3-cf10b923cd46


The error is here: "...19562//Telerik..." If i remove the second slash and put it manually on the address bar it's working fine.

How can I fix it? Any help will be very appreciated.

thanks!
Leandro
Top achievements
Rank 1
 answered on 12 Apr 2013
2 answers
89 views
Hi,

I have a grid and some user roles.

I would like to do the following,

when a user would like to edit the gridrow open a popup edit form but some of the controls set disabled or invisible based on the user role.

What is the best solution with telerik controls  for this?

Thanks.
Csaba
Top achievements
Rank 1
 answered on 12 Apr 2013
3 answers
311 views
Hello, I have several radcombobox controls in my aspx/c# web application.

- The radcombobox has the "Checkbox" parameter set to "true"
- the control is populated from codebehind on page load
- the control is held within RadAjaxPanel and ASP UpdatePanel

scenario: When i 'check' an item from the radcombobox, it shows the loading image and fires the OnSelectedIndexChanged event from code behind as supposed to. But when everything is completed, radcombobox on my page shows that no item has been selected... weird thing is when i select the same item from the same radcombox "again", it shows my selection properly.

So to sum it up, I have to select the item 'twice' for it to work right.

Am i doing something wrong? I just want the item to 'stay' selected from the first try without having to select it again.

ASPX:

<telerik:RadAjaxPanel ID="ProductsRadAjaxP" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" RequestQueueSize="50">
    <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
             <table width="100%">
              <tr>
                <td>
                  <asp:Label ID="lbl_Country" runat="server" Text="Country: " />
                 </td>
                 <td>
                  <telerik:RadComboBox ID="cmb_Country" runat="server" Height="200" Width="160" EmptyMessage="Choose Country" MarkFirstMatch="true" EnableLoadOnDemand="true" AutoPostBack="true" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" Filter="Contains" OnSelectedIndexChanged="cmb_Country_SelectedIndexChanged">
                  </telerik:RadComboBox>
                 </td>
                </tr>
                <tr>
                 <td>
                    <asp:Label ID="lbl_Casa" runat="server" Text="Casa: " />
                 </td>
                 <td>
                  <telerik:RadComboBox ID="cmb_Casa" runat="server" Height="200" Width="160" EmptyMessage="Choose Casa" MarkFirstMatch="true" EnableLoadOnDemand="true" AutoPostBack="true" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" Filter="Contains" OnSelectedIndexChanged="cmb_Casa_SelectedIndexChanged">
                                                </telerik:RadComboBox>
                 </td>
             </tr>
                  <!-- there are alot more controls, but all with the same parameter -->
         </table>
        </ContentTemplate>
    </asp:UpdatePanel>
 <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="1" Skin="Metro">
 </telerik:RadAjaxLoadingPanel>

C#:

    protected void cmb_Country_SelectedIndexChanged(object sender, EventArgs e)
    {
        //I have a long process and SQL procedures... this is just an example of how i'm filling the control
        cmb_Casa.DataSource = DataHelper.GetCasa(cmb_Country.CheckedItems[0].Value);
           cmb_Casa.DataBind();
    }
.
.
.
.


Nencho
Telerik team
 answered on 12 Apr 2013
4 answers
767 views
Hello Everyone,

I am using export to pdf feature in one of my grid.
Now my problem is data is overlapped in two columns while export to pdf file.

I had faced similar behavior while displaying rad grid and corrected by using following property
<MasterTableView TableLayout="Auto">
<ClientSettings>
      <Resizing ClipCellContentOnResize="false">
</ClientSettings>
</MasterTableView>

So my data overlap into 2 columns each other is resolved but similar issue i am facing while export same content to pdf

Seems rad grid not reading columns properties while exporting.

So any one have idea how to resolve it?

Regards,

Dharmesh

Kostadin
Telerik team
 answered on 12 Apr 2013
4 answers
214 views
I've been searching everywhere and not found the right combination of what will fix my problem. I have a DetailTables inside a grid, It has the internal Add new record from the CommandItemDisplay and a GridEditCommandColumn. It is using an FormTemplate for Editing and in that formtemplate I have a Label which is filled with the VcnCd from the parent grid. My problem is that when I click on the edit button that label is filled correctly with the VcnCd, but when I click the Add new button that label is empty. I have spent a lot of hours trying to find how to fill that label in the code behind with no luck. the label I'm trying to fill with the correct value is lblvType. I could use some help I'm doing this in VB. Here is my grid.
 
<telerik:RadGrid ID="grdVcntn" runat="server" AutoGenerateColumns="false">
  <ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
  </ClientSettings>
  <MasterTableView EditMode="PopUp" CommandItemDisplay="Top" ShowHeader="true" AutoGenerateColumns="false" DataKeyNames="VcnCd">
     <NoRecordsTemplate>
      There are no records for this person.
    </NoRecordsTemplate>
    <CommandItemTemplate>
      <asp:LinkButton ID="LinkButton1" runat="server" CommandName="InitInsert" >
        <img style="border:0px" alt="Add" src="../images/plus.gif" /> Add new Record
      </asp:LinkButton>
    </CommandItemTemplate>
    <Columns>
      <telerik:GridEditCommandColumn ButtonType="imageButton" EditImageUrl="../images/Edit.gif"></telerik:GridEditCommandColumn>
      <telerik:GridBoundColumn HeaderText="VcnCd" DataField="VcnCd" UniqueName="VcnCd"></telerik:GridBoundColumn>
      <telerik:GridBoundColumn HeaderText="VcnNm" DataField="VcnNm" UniqueName="VcnNm"></telerik:GridBoundColumn>
    </Columns>
    <EditFormSettings InsertCaption="Add record" CaptionDataField="VcnCd" CaptionFormatString="Edit record: {0}"
      EditFormType="Template" PopUpSettings-Modal="true" PopUpSettings-Height="260px" PopUpSettings-Width="500px">
      <FormTemplate>
        <table>
          <tr>
            <td>
              Code: <asp:DropDownList ID="dpdVcnCd" DataTextField="VcnNm" DataValueField="VcnCd" SelectedValue='<%# Bind("VcnCd") %>' 
              runat="server" DataSourceID="SqlDataSource1"></asp:DropDownList>
            </td>
          </tr>
          <tr>
            <td>
              <asp:Button ID="btnSubmitVcnCd" Text='<%# Iif(typeof Container is GridEditFormInsertItem, "Insert", "Update") %>'
                runat="server" CommandName='<%# Iif(TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'
                CommandArgument='<%# Eval("VcnCd") %>' />
              <asp:Button ID="btnCancelVcnCd" Text="Cancel" runat="server" CausesValidation="false" CommandName="Cancel" />
            </td>
          </tr>
        </table>
      </FormTemplate>
    </EditFormSettings>
    <DetailTables>
      <telerik:GridTableView Name="DetailTables" EditMode="PopUp" DataKeyNames="ID" DataSourceID="SqlDataSource3"
        Width="100%" runat="server" CommandItemDisplay="Top">
        <ParentTableRelation>
          <telerik:GridRelationFields DetailKeyField="VcnCd" MasterKeyField="VcnCd" />
        </ParentTableRelation>
        <Columns>
          <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../images/Edit.gif" UniqueName="Edit"></telerik:GridEditCommandColumn>
          <telerik:GridBoundColumn HeaderText="ID" DataField="ID" UniqueName="ID"></telerik:GridBoundColumn>
          <telerik:GridBoundColumn HeaderText="VcnCd" DataField="VcnCd" UniqueName="VcnCd"></telerik:GridBoundColumn>
          <telerik:GridBoundColumn HeaderText="Date" DataField="VcntnDt" UniqueName="VcntnDt" DataFormatString="{0:d}"></telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings InsertCaption="Edit Item" CaptionFormatString="Edit ID: {0}" CaptionDataField="ID" EditFormType="Template"
          PopUpSettings-Modal="true" PopUpSettings-Height="260px" PopUpSettings-Width="400px">
          <PopUpSettings Modal="true" />
          <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton" InsertImageUrl="../images/plus.gif" EditImageUrl="../images/Edit.gif"></EditColumn>
          <FormTemplate>
            <table id="tblEditVcnDte">
              <tr>
                <td colspan="2" align="left">Vaccination Type: <asp:Label ID="lblvType" Text='<%# Bind("VcnCd") %>' runat="server"></asp:Label></td>
              </tr>
              <tr>
                <td align="right">Date :</td>
                <td>
                  <asp:TextBox ID="txtVcnDte" runat="server" Text='<%# Bind("VcntnDt","{0:d}") %>'></asp:TextBox>
                </td>
              </tr>
            </table>
            <table style="width: 100%">
              <tr>
                <td align="right" colspan="2">
                  <asp:Button ID="btnSubmitVcn" Text='<%# Iif(typeof Container is GridEditFormInsertItem, "Insert", "Update") %>'
                    runat="server" CommandName='<%# Iif(TypeOf Container is GridEditFormInsertItem, "InsertCdDt", "UpdateCdDt") %>'
                    CommandArgument='<%# Eval("ID") %>'  />
                  <asp:Button ID="btnCancelVcn" Text="Cancel" runat="server" CausesValidation="false" CommandName="Cancel" />
                </td>
              </tr>
            </table>
          </FormTemplate>
        </EditFormSettings>
      </telerik:GridTableView>
    </DetailTables>
  </MasterTableView>
  <ClientSettings>
    <ClientEvents OnPopUpShowing="PopUpShowing" />
    <Selecting AllowRowSelect="true" />
  </ClientSettings>
 
</telerik:RadGrid>
mike
Top achievements
Rank 1
 answered on 12 Apr 2013
2 answers
652 views
Hello.

I'm using a GridImageColumn in a document management scenario to display a small thumbnail of the document being referred to by each row in my grid.  I create the image column in code-behind, because my grid column set is somewhat dynamic based on configuration of our product.  In the method that creates the GridImageColumn, I have the following code:

gridView.Columns.Add(imageColumn);
imageColumn.HeaderText = label;
imageColumn.ImageHeight = 30;
imageColumn.ImageWidth = 30;

When I use this, my images are sized to the exact size specified, where I had instead hoped that it would create a bounding box around the image and preserve the aspect ratio of the image.

Is there any straightforward way to preserve the aspect ratio?
David
Top achievements
Rank 1
 answered on 12 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?