Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
471 views
Followed the directions in adding a custom skin (EnableEmbeddedSkins="false", directory structure, rename, etc.)
Got the skin to work with base Vista css. Now when I try to modify the "rcbItem" class in my custom CSS it won't take. I am trying to change the padding. I set the padding to 0 but when I inspect the CSS resources loaded with DebugBar I still see the Telerik DLL generating this WebResource.axd and it seems to override my custom style.

/* Rule N°50 from /WebResource.axd?d=E8zhOF-IazAtz5qciqUY9gMwF1Nx6baK0ZAdEkqrjJx-o8HuvngvfAVyz4OcUqi8l9oITMy5IuIHW8RO7_Y93A2&t=633957930320000000 */
.RadComboBoxDropDown .rcbItem {
    PADDING-BOTTOM:2px;  
    MARGIN:0px 1px; 
    PADDING-LEFT:6px;   
    PADDING-RIGHT:6px;   
    PADDING-TOP:2px 
}

 
How can I get rid of these emdedded CSS links. Need the padding-top-bottom to be 0.
Kamen Bundev
Telerik team
 answered on 27 Aug 2010
2 answers
82 views
Hi!
How can i get text to wrap around an image like this:

http://drupal.org/files/issues/Screenshot-imagepicker.png

with the tools in the editor?


Thanks, Lautaro.
Lautaro
Top achievements
Rank 1
 answered on 27 Aug 2010
2 answers
178 views

I have a grid where you select the grid item via a checkbox inside a templatecolumn, when you click on the checkbox it highlights the grid item and then i do other operations on the grid selected items.

The problem is that when you click one row via the checkbox other functionality does not work after that intial click, for example if i wanted to select another row via the checkbox it will not highlight the row and partial postback does not occur, i can resolve the issue by turning off ajax.

So basically you click any checkbox in any row and then functions do not work for instance the authorise command does not work, it is like the page invalid.

Attached grid html:

<telerik:RadGrid 
    ID="paymentsGrid" 
    runat="server"
    AllowSorting="False" 
    AllowPaging="False"
    AllowFilteringByColumn="False"
    AllowAutomaticInserts="True"
    AllowAutomaticUpdates="True"
    AllowAutomaticDeletes="True" 
    AutoGenerateColumns="False"
    MasterTableView-HeaderStyle-Wrap="false"
    MasterTableView-ItemStyle-Wrap="false" 
    GridLines="None" 
    ShowFooter="true"
    EnableLinqExpressions="false"
    onitemdatabound="paymentsGrid_ItemDataBound"
    OnItemCommand="paymentsGrid_OnItemCommand"
    ShowHeader="true"
    AllowMultiRowSelection="true">
      
    <MasterTableView CommandItemDisplay="Top">
      
     <CommandItemTemplate>
         <div style="margin:5px;padding:5px">
            <div style="float:right">
            <asp:LinkButton ID="lbAuthorise" runat="server" CommandName="Authorise" OnClientClick="javascript:if(!confirm('Are you sure you want to authorise the selected payments?')){return false;}">Authorise</asp:LinkButton>
            </div>
        </div>
  
         </CommandItemTemplate>  
           
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
  
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
          
        <Columns>
          
            <telerik:GridBoundColumn DataField="PeriodFrom" ReadOnly="true" UniqueName="PeriodFrom" HeaderText="From" DataFormatString="{0:dd/MM/yyyy}"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="PeriodTo" ReadOnly="true" UniqueName="PeriodTo" HeaderText="To" DataFormatString="{0:dd/MM/yyyy}"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ContractReference" ReadOnly="true" UniqueName="ContractReference" HeaderText="CT-No"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ContractName" ReadOnly="true" UniqueName="ContractName" HeaderText="Contract"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="SiteName" ReadOnly="true" UniqueName="SiteName" HeaderText="Site"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TotalCost" ReadOnly="true" UniqueName="TotalCost" HeaderText="Cost" Aggregate="Sum" DataFormatString="{0:C2}" FooterAggregateFormatString="Total: {0:C2}"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AuthorisedBy" ReadOnly="true" UniqueName="AuthorisedBy" HeaderText="Authorised By"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AuthorisedWhen" ReadOnly="true" UniqueName="AuthorisedWhen" HeaderText="Authorised When"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AuthorisedAmount" ReadOnly="true" UniqueName="AuthorisedAmount" HeaderText="Authorised Amount" Aggregate="Sum" DataFormatString="{0:C2}" FooterAggregateFormatString="Total Authorised: {0:C2}"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="SiteID" ReadOnly="true" Display="false" UniqueName="SiteID"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ContractID" ReadOnly="true" Display="false" UniqueName="ContractID"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="PaymentID" ReadOnly="true" Display="false" UniqueName="PaymentID"></telerik:GridBoundColumn>
             
            <telerik:GridTemplateColumn UniqueName="selectionColumn" AllowFiltering="false" HeaderStyle-Width="27px">
            <HeaderTemplate>
            <asp:CheckBox id="chkPaymentGridHeader" OnCheckedChanged="paymentsGrid_HeaderCheckChanged" AutoPostBack="True" runat="server"></asp:CheckBox>
            </HeaderTemplate>
            <ItemTemplate>
            <asp:CheckBox id="chkPaymentGridItem" OnCheckedChanged="paymentsGrid_ItemCheckChanged" AutoPostBack="True" runat="server"></asp:CheckBox>
            </ItemTemplate>
            </telerik:GridTemplateColumn> 
                      
        </Columns>
          
        <ItemStyle Wrap="False"></ItemStyle>
        <HeaderStyle Wrap="False"></HeaderStyle>
        <FooterStyle Wrap="false"></FooterStyle>
      
    </MasterTableView>
  
    
</telerik:RadGrid>


The checkbox events:
protected void paymentsGrid_HeaderCheckChanged(object sender, EventArgs e)
         {
             if ((sender as CheckBox).Checked)
             {
                 foreach (GridDataItem dataItem in paymentsGrid.MasterTableView.Items)
                 {
                     (dataItem.FindControl("chkPaymentGridItem") as CheckBox).Checked = true;
                     dataItem.Selected = true;
                 }
             }
             else
             {
                 foreach (GridDataItem dataItem in paymentsGrid.MasterTableView.Items)
                 {
                     (dataItem.FindControl("chkPaymentGridItem") as CheckBox).Checked = false;
                     dataItem.Selected = false;
                 }
             }
         }
  
         protected void paymentsGrid_ItemCheckChanged(object sender, EventArgs e)
         {
             bool itemIsChecked = (sender as CheckBox).Checked;
  
             ((sender as CheckBox).Parent.Parent as GridItem).Selected = (sender as CheckBox).Checked;
  
         }


iam using version q1 2010

Thanks
Darren
Top achievements
Rank 1
 answered on 27 Aug 2010
2 answers
134 views
Hi

I got the RadControls_for_ASP.NET_AJAX_2010_2_713_dev.EXE from our application drive and installed it.

How can I check if I'm running a trial version or we bought this release?

Regards
Jef
Jef Claes
Top achievements
Rank 1
 answered on 27 Aug 2010
1 answer
137 views
Is there a way to prevent the content in the table of the RadDatePicker popup calendar from being indexed by Google, etc.?

I know there are other ways of solving the problem I'm having with that content showing up in search engine indexing, but I'd like an answer to this specific question, please. Thank you.
Dimo
Telerik team
 answered on 27 Aug 2010
1 answer
87 views

Hello,

I really don't where to post this question basically.

But I have problems in viewing Editor, Grid.

Editor looks overflowed before Ajax postback get resumed after ajax postback.

I have attached screen shot for before ajax view.

Image Before Postback

Now after postback my Editor look fine, problem get occur with Grid view.

Attached screen shot for after postback event.

Image after Posrtback

(I tried attaching files as an attachment, But it didnt  work)

Thanks

Ashish Sapkale

Dimo
Telerik team
 answered on 27 Aug 2010
3 answers
139 views
We are trying to implement the ability to enable a client to upload an image which will then be redisplayed via the Binary Image control. Does anyone have any ideas on how we run any sort of antivirus on this type of upload?
Regards,
Mark Austin
T. Tsonev
Telerik team
 answered on 27 Aug 2010
3 answers
154 views
Hi,

it's very easy to make a list of items scrollable - and it works like a charm.
Except one thing - the scroll position.

Assume the users scrolls down and selects an item.
Then he expands another group (SingleSelect mode is set).
Later he expands the previously selected group.
He sees the items list - but the selected one is "somewhere".

The same problem happens with data binding.
Assume a serverside selected item - way down in the scroll area.

So what the user gets is a "where is the item" situation.

My first thought was to use the "OnClientItemExpand" event.
The documentation says:
OnClientItemExpand occurs immediately after an item is expanded

But "after" is not really after as it looks.
My first approach was this:
Snippet created with CBEnhancer
function OnExpand(sender, args) {
    var iTem = args.get_item();
    if (iTem.get_level() != 0) {
        return;    //only interest in top level items
    }
    var items = iTem.get_items();
    for (var i = 0; i < items.get_count(); i++) {
        if (items.getItem(i).get_selected()) {
            items.getItem(i).focus();
            return;
        }
    }
}
This results in a stack overflow - it seems setting the focus calls OnExpand again.
Not really a problem - I locked the function like this:
Snippet created with CBEnhancer
var didFocus = false;
function OnExpand(sender, args) {
    if (didFocus) {
        return;
    }
    var iTem = args.get_item();
    if (iTem.get_level() != 0) {
        return;    //only interest in top level items
    }
    var items = iTem.get_items();
    for (var i = 0; i < items.get_count(); i++) {
        if (items.getItem(i).get_selected()) {
            didFocus = true;
            items.getItem(i).focus();
            didFocus = false;
            return;
        }
    }
}
No more stack overflow - but an error message that an invisible item can't get the focus.
This makes me think the event fires not "after" it is expanded.
My final approach is:
Snippet created with CBEnhancer
var curSelItem;
function DoFocus() {
    curSelItem.focus();
}
function OnExpand(sender, args) {
    var iTem = args.get_item();
    if (iTem.get_level() != 0) {
        return;
    }
    var items = iTem.get_items();
    for (var i = 0; i < items.get_count(); i++) {
        if (items.getItem(i).get_selected()) {
            curSelItem = items.getItem(i);
            setTimeout("DoFocus()", 500);
            return;
        }
    }
}

This works - but I'm not really happy with that approach.
Assume somebody decides to use a longer animation duration or something like this.

If I set "ExpandDelay" to (let's say) 500 - my workaround does no long work.
OnClientItemExpand fires as soon as I click the expand arrow - and not (as documented) "immediately after an item is expanded".

My Question - is there a better approach to solve this problem?
Or did I miss something in the documentation?

Manfred
Peter
Telerik team
 answered on 27 Aug 2010
2 answers
224 views
Hi,

How can I center the 'OK' button in rad alert?

Thanks
Saravanan
saravanan k
Top achievements
Rank 1
 answered on 27 Aug 2010
1 answer
168 views
Hi,
I am tying to export my grid to PDF but it fails. I am attaching my files and code; please have a look and help.
Here is my code to export.

      grd.ExportSettings.ExportOnlyData = true;
            grd.ExportSettings.IgnorePaging = true;
            grd.ExportSettings.FileName = "Retailer Scenario PL";
            grd.ExportSettings.OpenInNewWindow = true;
            grd.MasterTableView.ExportToPdf();

Is there any way I can change the font size and margins  of exported file?
Shinu
Top achievements
Rank 2
 answered on 27 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?