Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
185 views

I have been try to center a dynamically create checkbox column with the checkbox centered. If you create it in design time, it is centered. When I create it dynamically in the Page_Load event I get the checkbox left justified. My code behind is in VB. I created it as follows:

Dim checkBoxColumn As NewTreeListCheckBoxColumn()

treeList.Columns.Add(checkBoxColumn)

checkBoxColumn.DataField = "Accessibility"

checkBoxColumn.UniqueName = "Accessibility"

checkBoxColumn.HeaderText = "Accessibility"

checkBoxColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

It works, just not centered. Any ideas as to why I cannot center the checkbox?

Thanks,
Paul

Paul
Top achievements
Rank 1
 answered on 18 Oct 2011
3 answers
221 views
when using GridTemplateColumn, it wont show french characters like(èèèèèèèèèèèèèèèè) nicely(it will display htmlcode), but if with /telerik:GridBoundColumn, they would be fine.

Is this a bug? Is there a solution to overcome this problem ? Thanks for help


 <telerik:GridTemplateColumn DataField="Transcription" HeaderText="Response/Transcription"
                                                                UniqueName="Transcription">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.TooltipText") %>' />
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.TooltipText") %>' />
                                            <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="Label1" Width="150px"
                                                RelativeTo="Element" Position="MiddleRight" ManualClose="true">
                                                <%# DataBinder.Eval(Container, "DataItem.Transcription")%>
                                            </telerik:RadToolTip>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
Marin Bratanov
Telerik team
 answered on 18 Oct 2011
0 answers
92 views
Hi All,

              Am facing problem in filtering .

The scenario is as following  

        when i filter some content with some option like  contains then filtering happens and also if i apply filtering on some other column it is also working but in some cases when am taking like  equal option other column filtering is happening which i was not given with data loading automatically.


          please suggest why this situation arises any coding problem how can i come to know???????

Regards,
Sravan
Magnasys
sravan
Top achievements
Rank 1
 asked on 18 Oct 2011
1 answer
137 views

A loading panel is displayed after canceling a partial postback in javascript on the PageRequestManagers InitalizeRequest event handler. How do I get rid of the loading panel?  Is there any other way to cancel the partial postback?

I have radio buttons in the command section of an ajaxified RadGrid.

<CommandItemTemplate>
  <asp:RadioButton ID="sortByDateOfEntryRadioButton" AutoPostBack="true" 
    OnCheckedChanged="ReOrderTimesheetItems"
    runat="server" Text="Order Of Entry" GroupName="TimesheetItemSortOrder" />
  
  <asp:RadioButton ID="sortByDateOfTimesheetItemDateRadioButton" AutoPostBack="true"
    OnCheckedChanged="ReOrderTimesheetItems" runat="server" Text="Timesheet Date/Time"
    GroupName="TimesheetItemSortOrder" />
</CommandItemTemplate>

I stop the partial post back that occurs when selecting a radio button if the form is dirty. using the javascript below.

The partial postback is sucessfully canceled on the line args.set_cancel(true) but the loading panel is still displayed.

function initRequest(sender, args) {
    var isSortingTimesheetItems = 
    ((args.get_postBackElement().id.indexOf("sortByDateOfTimesheetItemDateRadioButton") != -1)
    || (args.get_postBackElement().id.indexOf("sortByDateOfEntryRadioButton") != -1))
  
    if (isSortingTimesheetItems) {
        // this check has to be done here to stop the partial post back
        if (!FormIsDirty()) {
            args.set_cancel(true);  //stop async request
            return;
        } 
  }
}
  
function RegisterScriptManagerInitializeRequestEvent() {
    Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initRequest);
}

How do I get rid of the loading panel?
Is there any other way to cancel the partial postback?
Maria Ilieva
Telerik team
 answered on 18 Oct 2011
3 answers
383 views
Hi,

I am using RadGrid and doing a simple data binding to bind to a list. The enableviewstate is set to true. But the grid does not populate data after a postback. Am I doing any thing wrong.
Sebastian
Telerik team
 answered on 18 Oct 2011
1 answer
153 views
Hello Telerik Team,

I would like to first thank you for a constant and high quality product.

I have a RadGrid that is grouped with custom fields, I am currently opening RadWindows from the ImageButton click events like so:
protected void Play_Click(object sender, ImageClickEventArgs e)
{
    Geek.XTV7_Time_Start = DateTime.Now.ToString();
 
    string sql = "";
    var dt = new DataTable();
    sql += " Select ISNull( XTV7_VideoHits, 0) AS XTV7_VideoHits From Xtrain.XTV7_2_Videos WHERE  (XTV7_Videos_ID=" + Geek.XTV7_Videos_ID.ToString() + ")";
 
        dt = data.GetDataTable(sql);
        Geek.XTV7_VideoHits = (Int32.Parse(dt.Rows[0]["XTV7_VideoHits"].ToString()) + 1).ToString();
        VidHit();
 
        RadAjaxManager1.ResponseScripts.Add("radopen('Forms/View/VideoViewer.aspx','RadWindow1')");
 
}

 to open a RadWindow (depending on what button, as each button has its own windows via a RadWindow Manager) after passing a session variable via my session handler Geek.XTV7_Videos_ID from the SelectedValue. (this code is used to get the id and pass it to the session variable:

protected void RadGrid_ItemCommand(object source, GridCommandEventArgs e)
{
 
    if ((e.Item is GridDataItem) && (e.CommandName == "Select"))
    {
        var item = (GridDataItem)e.Item;
        string gvDataKey = item.GetDataKeyValue("XTV7_Videos_ID").ToString();
        Geek.XTV7_Videos_ID = gvDataKey;
    }
}

)

Then on RadWindowClose() there is a value written to the DataBase to reflect the hits, the window close method initiates the folowing code to refresh the grid and send update command to the DB:

videoselector.ascx.cs
#region Ajax Manager Request
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    switch (e.Argument)
    {
        case "closed":
            UpdateView();
            RadGrid1.Rebind();
            break;
    }
}
#endregion

videoselector.ascx
function onClose() {
    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("closed");
}
function RowSelected(row) {
}

sorry for the long intro but I need to be sure that the environment is understood.

THE PROBLEM:
we need to be able to pass a variable to Geek.XTV7_Videos_ID on mouse over and refresh or instantiate an AJAX request on the panel shown in the attached image (without breaking existing methods and events).
How would I go about this?

Thank you very much in advance.

Trent

Tsvetoslav
Telerik team
 answered on 18 Oct 2011
3 answers
1.0K+ views
Hi,

Can someone help me figure out how to get a label control text value from grid item template column?
<telerik:GridTemplateColumn DataField="Amount" HeaderText="Amount" UniqueName="Amount">
                   <ItemStyle BorderStyle="NotSet" CssClass="test" HorizontalAlign="Right" Width="75px" />
                   <HeaderStyle HorizontalAlign="Center" Width="85px" />
                   <ItemTemplate>
                       <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("Amount") %>'
                           Width="75"></asp:Label>
                   </ItemTemplate>
                   <EditItemTemplate>
                       <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("Amount") %>'
                           Width="75"></asp:Label>
                   </EditItemTemplate>
               </telerik:GridTemplateColumn>
Label amount = (Label)item.FindControl("lblAmount");
double? amount= (item["Amount"].FindControl("lblAmount") as Label).Text;
I've tried both ways and neither seems to work. Thanks in advance.
Tsvetoslav
Telerik team
 answered on 18 Oct 2011
1 answer
146 views
Is it possible to drag a RadWindow by some other control (say a div) like you can with the RadDock?

Thanks
Marin Bratanov
Telerik team
 answered on 18 Oct 2011
4 answers
150 views

 Hi,

 I need to remove an hyperlink look from my tree nodes.  Tryed TreeNodeOver style like "text-decoration: none". However it is not working.

I used the below css code on aspx page:

<style type="text/css">
.myNodeHoveredCss .rtIn
{
    text-decoration: none !important;
} 
.myNodeSelectedCss .rtIn
{
    text-decoration: none !important;
}
</style>

Code behind used below line:
stNode.HoveredCssClass = "myNodeHoveredCss";

Can you please tell me how to remove Hyperlink look from tree node?.

Venkadesh Babu
Top achievements
Rank 1
 answered on 18 Oct 2011
3 answers
1.1K+ views
Hey everyone,

How to get the value selected from datepicker in codebehind?...

Thanks
Amit
Maria Ilieva
Telerik team
 answered on 18 Oct 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?