Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
92 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
424 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
99 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
80 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
296 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
733 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
193 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
631 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
1 answer
269 views
asp.net

So I have a Grid that users enter data in (no surpise there) and then they hit a submit button to submit the changes to the database.

In the ItemDataBound event I determine if the field is a text box, then determine if I should set it multi or single line (if it is under a certain number of characters, it will stay singline.)

Dim txt As TextBox = CType(e.Item.FindControl("txtValue"), TextBox)
txt.TextMode = TextBoxMode.MultiLine

I am trying to figure out how to do this same logic on the client side in javascript.

function processValueChange(sender, rowID) {
     var myTextValue = row.findElement("Value");
     myTextValue = Multiline;
}

I do not know if you can set the mode like this on the fly without rebinding the grid...

Also the reason I do not set the MultiLine always to true on textboxes is because of the scrollbar that shows up in the multiline text box.  It is very distracting to see a bunch of little arrows in all my text box fields and would like them visible only when necessary.  Unless there is a way to get ride of them.
Eyup
Telerik team
 answered on 12 Apr 2013
1 answer
193 views
Dear Telerik Team,

We are using Rad Multi page (Tab) control. if we want to Hide/Show Panel Control at client side. we could not do that since object itself not available. it is an content page with Rad Multi page. we tried with Div also. we could not hide / show that control on run time at client side. This behaviour works if its without rad multi page. 

if we hide the control by setting visible properties of Panel at design time. it is not rendered to client side at all. 
but for Div Tag if use Style display:None,it is rendering at client side but not hiding the div tag.

the above functionality works without rad multi page

Requesting your help on the same.


With Regadrs
Palanivelrajan



Nencho
Telerik team
 answered on 12 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?