Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
104 views
hi
i  have template field (twextbox) into radgrtid
i type value in textbox ,but when i get value ,show ""

    <telerik:GridTemplateColumn HeaderText="شماره سند" FilterControlWidth="10px" UniqueName="AccountingDoc1">
                        <ItemTemplate>
                        <asp:TextBox ID="txtAccountingDoc"  runat="server" >
                        </asp:TextBox>
                        
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>


*****************************************************************************************************************************

  protected void grdDetailAccount_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {

            e.Canceled = true;
            foreach (GridDataItem item in grdDetailAccount.Items)
            {

                string detailAccountID = grdDetailAccount.MasterTableView.DataKeyValues[e.Item.ItemIndex]["detailAccountID"].ToString();
          

                if (((TextBox)item["AccountingDoc1"].FindControl("txtAccountingDoc")).Text != "")
                {
                    strAccountingDocNo = ((TextBox)item["AccountingDoc1"].FindControl("txtAccountingDoc")).Text;
                    CDSStockLogic.BusinessObjects.UI.AccountingDocs.updateDetailAccountID(strAccountingDocNo, detailAccountID);
                }
            }
        }

strAccountingDocNo  is null but i type value
plz help

Shinu
Top achievements
Rank 2
 answered on 20 Sep 2010
7 answers
404 views
I am using RadGrid Q1 2009 in my application. I have set the pagesize of the grid to 50. While running the application, when I change the pagesize to 10 or 20, the OnPageSizeChanged event doesn't fire. As a result of this, the grid is not binding to the datasource and the grid doesn't show up.

However, if I set the pagesize to 10, then on changing the page size, then OnPageSizeChanged event gets fired appropriately.

Can anyone tell me what am I doing wrong or how to get around this problem.

Pavel
Telerik team
 answered on 20 Sep 2010
5 answers
118 views

Hi All,

RAD Grid scrolling(Horizontal and Vertical) performance in IE6 and IE7 is too slow. We need to show more than thousand records with static header but it's working fine in Fire fox and Safari.



Dimo
Telerik team
 answered on 20 Sep 2010
1 answer
220 views
hi,

how to get the height  of tree view after it has been expanded?

and how I can expand inner node from other html button click event?
Shinu
Top achievements
Rank 2
 answered on 20 Sep 2010
1 answer
656 views
Hi,
i am using terelik radgrid and i want to disable delete button on some condition. but i could not able to find out the button ...

here is the grid code...

<telerik:RadPageView ID="rpvActions" runat="server">
<div>
    
                <table style="width: 780px; height: 256px;">
                    <tr>
                        <td colspan="2" valign="top" style="height: 100px">
                        <asp:Panel ID="pnlActions" runat="server" GroupingText="Workplan"
                                CssClass="groupBoxActionGrid" Style="position: relative; z-index: 100; top: 0px; left: 0px; " 
                                Font-Size="12px" Width="780px">
                            <div style="left: 0px; width: 100%; position: relative; top: 0px;">
                            &nbsp;&nbsp;&nbsp;&nbsp;
                                <telerik:RadGrid runat="server"
                                    ID="grdActions"
                                    AllowPaging="false"
                                    Width="750px"
                                    AutoGenerateColumns="false"
                                    Skin="Office2007"
                                    DataSourceID="TaskActionsDataSource"
                                    AllowAutomaticInserts="true"
                                    AllowAutomaticUpdates="true"
                                    AllowAutomaticDeletes="true"
                                    CommandItemDisplay="Top"
                                    OnItemDataBound="grdActions_ItemDataBound"
                                >
                                <ClientSettings EnableAlternatingItems="true"
                                                EnableRowHoverStyle="true"
                                                AllowExpandCollapse="false"
                                                ClientEvents-OnPopUpShowing="PopUpShowing"
                                            >
                                            
                                    <DataBinding EnableCaching="true" />
                                    <Selecting AllowRowSelect="True" />
                                </ClientSettings>
                                
                                <MasterTableView DataKeyNames="Id" TableLayout="Fixed"
                                     AllowMultiColumnSorting="false"
                                     AllowFilteringByColumn="false"
                                     AlternatingItemStyle-BackColor="#F2F3F5"
                                     AllowAutomaticInserts="true"
                                     AllowAutomaticUpdates="true"
                                     CommandItemDisplay="Top"
                                     NoMasterRecordsText="There are currently no actions for the task. Note that at least one action needs to be present"
                                     EditMode="PopUp"
                                 >
                                    <Columns>                                   
                                         <telerik:GridBoundColumn
                                            DataField="SortCode"
                                            Visible="true"
                                            HeaderText="#"
                                            HeaderStyle-Width = "30"
                                            ItemStyle-Font-Bold="true"
                                            ItemStyle-Font-Names="Tahoma"
                                        >
                                        </telerik:GridBoundColumn>
                                        
                                        <telerik:GridTemplateColumn UniqueName="TemplateColumn" InitializeTemplatesFirst="false">
                                            <HeaderTemplate>
                                                <table id="Table1" cellspacing="0" cellpadding="0" border="0">
                                                    <tr>
                                                        <td colspan="0">
                                                            <b>Action Details</b>
                                                         </td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <table cellpadding="0" cellspacing="0" width="100%">
                                                
                                                <tr>
                                                    <td style="border-width: 0px;"><input type="hidden" id="hiddenActionId" value="<%# Eval("Id") %>" /></td>
                                                </tr>
                                                
                                                    <tr>
                                                        <td colspan="6" style="width: 200px; font-size: 12px; font-family: Tahoma;">
                                                            <b>Name:&nbsp;</b><%# Eval("Description") %> (<%# Eval("TypeName") %>) <%#  Convert.ToBoolean(Eval("Location").Equals("")) ? "" : ":: " + Eval("Location")%>
                                                        </td>
                                                        <td align="right">
                                                             <img src="../images/status_<%# Eval("StatusName")%>.png" alt="<%# Eval("StatusName")%>" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="4" style="width: 250px; font-size: 12px; font-family: Tahoma;">
                                                            <b>Output:&nbsp;</b> <%# Eval("Output") %>
                                                        </td>
                                                        <td rowspan="3" style="width: 50px; font-size: 12px; font-family: Tahoma;" align="center">
                                                            <img src="../images/status_<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "nobudget" : "budget" %>.png" 
                                                            alt='<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "No budget required for this action" : "Budget estimation required for this action" %>' />
                                                        </td>
                                                        
                                                        <td colspan="2" rowspan="3" style="width: auto; font-size: 12px; font-family: Tahoma;" align="center">
                                                           $ <%# Eval("TotalEstimationInDollar") %> &nbsp;&nbsp;&nbsp;&nbsp; € <%# Eval("TotalEstimationInEuro") %>

                                                    </tr>
                                                    <tr>
                                                        <td colspan="4" style="font-size: 12px; font-family: Tahoma;">
                                                            <b>Date:&nbsp;</b> <%# Eval("StartDate") %> <%# Convert.ToBoolean(Eval("CompletionDate").Equals("")) ? "" : " to " + Eval("CompletionDate") %>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="4" style="font-size: 12px; font-family: Tahoma;">
                                                            <b>Comment:&nbsp;</b> <%# Eval("Comment") %>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                            
                                        </telerik:GridTemplateColumn>
                                        
                        <telerik:GridButtonColumn  
                            ConfirmTitle="Edit" ButtonType="ImageButton" ImageUrl="~/Images/Edit.gif" CommandName="Edit" Text="Edit"
                            UniqueName="EditCommandColumn" HeaderStyle-Width="30px">
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridButtonColumn>
                        
                        <telerik:GridButtonColumn ConfirmText="Are you sure you want to delete the action (NOTE: Task save is required to persist the operation)?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete Record" ButtonType="ImageButton" ImageUrl="~/Images/Delete.gif" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteCommandColumn" HeaderStyle-Width="30px">
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridButtonColumn>
                        
                                    </Columns>

                <EditFormSettings EditFormType="Template" PopUpSettings-Width="620px"
                        PopUpSettings-Height="390px" CaptionFormatString="Action Details">
                    <FormTemplate>
                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                            style="border-collapse: collapse; background: white; height: 320px; width: 600px;">
                            
                            <asp:Label runat="server" ID="actionId" value='<%# Eval("Id") %>' />
                                <br />
                            <tr>
                                <td>
                                    <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0">
                                        <tr>
                                            <td class="smallFont" style="top: 82px; position: absolute;">Name &nbsp;&nbsp;</td>
                                            <td class="smallFont" style="top: 79px; position: absolute; left: 65px;">
                                                <asp:TextBox ID="txtDescription" runat="server" Text='<%# Bind("Description") %>' Width="500px">
                                                </asp:TextBox>
                                                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="txtDescription"
 ErrorMessage="* Enter Name" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="smallFont" style="top: 112px; position: absolute;">Type &nbsp;</td>
                                            <td style="top: 109px; left: 65px; position: absolute;">
                                                <asp:RadioButtonList ID="rblActionType" runat="server" Height="26px" ReadOnly="true" Width="220px" AppendDataBoundItems="true" RepeatDirection="Horizontal"
                                                    AutoPostBack="false" SelectedValue='<%# Bind("ActionTypeId") %>' DataSourceID="ActionTypeInfoList"
                                                    DataValueField="Id" DataTextField="Name" OnTextChanged="rblActionType_TextChanged"
                                                    >
                                                    
                                                    <asp:ListItem Value="" Text="" style="display: none;" />
                                                
                                                </asp:RadioButtonList>
                                                
                                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="rblActionType"
 ErrorMessage="* Select Action Type" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>

                                        </tr>
                                        <tr>
                                            <td class="smallFont" style="top: 138px; position: absolute;">
                                                Location &nbsp;</td>
                                            <td>
                                                <asp:TextBox ID="txtLocation" runat="server" Text='<%# Bind("Location") %>' Width="500px" style="top: 136px; left: 65px; position: absolute;">
                                                </asp:TextBox></td>
                                        </tr>

                                        <tr>
                                            <td class="smallFont" style="top: 165px; position: absolute;">Start &nbsp;</td>
                                            <td class="smallFont">
                                            
                                                <telerik:RadDatePicker ID="startDate" runat="server" Skin="Web20" DbSelectedDate='<%# Bind("StartDate") %>' style="top: 164px; left: 65px; position: absolute;">
                                                </telerik:RadDatePicker>
                                            
                                            
                                                <asp:Label ID="Label1" runat="server" style="top: 165px; position: absolute; left: 250px;" Text="End Date" />
                                            
                                                <telerik:RadDatePicker ID="endDate" runat="server" Skin="Web20" DbSelectedDate='<%# Bind("CompletionDate") %>' style="top: 164px; position: absolute; left: 315px;">
                                                </telerik:RadDatePicker>
                                            </td>
                                            
                                        </tr>

                                        <tr>
                                            <td class="smallFont" style="top: 195px; position: absolute;">Status &nbsp;</td>
                                            <td>
                                                <asp:DropDownList runat="server" DataSourceID="ActionStatusInfoList" AppendDataBoundItems="true"
                                                    ID="cboActionStatus" Width="220px" DataValueField="Id"
                                                    DataTextField="Name" SelectedValue='<%# Bind("ActionStatusId") %>' style="height: 21px; top: 192px; left: 65px; position: absolute;"
                                                     OnTextChanged="cboActionStatus_TextChanged"
                                                    >
                                                    
                                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                                
                                                </asp:DropDownList>
                                                
                                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="cboActionStatus"
 ErrorMessage="* Select Status" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="smallFont" style="top: 221px; position: absolute;">
                                                Output &nbsp;</td>
                                            <td>
                                                <asp:TextBox ID="txtOutput" runat="server" Text='<%# Bind("Output") %>' Width="500px" style="top: 223px; left: 65px; position: absolute;">
                                                </asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td class="smallFont" style="top: 253px; position: absolute;">Requires Budget?</td>
                                            <td style="top: 0px; left: 105px; position: absolute;">
                                                <asp:RadioButtonList ID="RadioButtonList2" runat="server" Height="26px"
                                                    ReadOnly="true" Width="220px" RepeatDirection="Horizontal" style="top: 251px; position: absolute;"
                                                    AutoPostBack="false" SelectedValue='<%# Bind("NoBudgetFlag") %>'
                                                    >
                                                        <asp:ListItem Value="" Text="" style="display: none;" />
                                                        <asp:ListItem Value="False" Text="Yes" />
                                                        <asp:ListItem Value="True" Text="No" />
                                                </asp:RadioButtonList>
                                                
                                                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="RadioButtonList2"
 ErrorMessage="* Select Requires Budget" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td class="smallFont" style="top: 284px; position: absolute;">Show on schedule? &nbsp;</td>
                                            <td style="top: 0px; left: 105px; position: absolute;">
                                                <asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="26px"
                                                    ReadOnly="true" Width="220px" RepeatDirection="Horizontal" style="top: 281px; position: absolute;"
                                                    AutoPostBack="false" SelectedValue='<%# Bind("ShowOnScheduleFlag") %>'
                                                    >
                                                        <asp:ListItem Value="" Text="" style="display: none;" />
                                                        <asp:ListItem Value="True" Text="Yes" />
                                                        <asp:ListItem Value="False" Text="No" />
                                                
                                                </asp:RadioButtonList>
                                                
                                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="RadioButtonList1"
 ErrorMessage="* Select Show on schedule" Style="z-index: 106; left: 670px;
                                    position: absolute; top: 51px" Display="None" ValidationGroup="actionsave"/>
                                        </tr>
                                        <tr>
                                            <td class="smallFont" style="top: 310px; position: absolute;">
                                                Comment &nbsp;</td>
                                            <td>
                                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Comment") %>' Width="500px" style="top: 307px; left: 65px; position: absolute;">
                                                </asp:TextBox></td>
                                        </tr>
                            <tr>
                                <td align="right" colspan="2" rowspan="4" style="top: 340px; position: absolute; left: 300px;">
                                    <asp:Button ID="btnUpdate" ValidationGroup="actionsave" Text='<%# (Container is GridEditFormInsertItem) ? "Insert (Task Save Required)" : "Update (Task Save Required)" %>'
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                    </asp:Button>&nbsp;
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:Button></td>
                                         
                            </tr>
                            </table>
                        </table>
                    </FormTemplate>
                </EditFormSettings>

                                </MasterTableView>
                                </telerik:RadGrid>
                                &nbsp;&nbsp; &nbsp;&nbsp;
                            </div>
                           </asp:Panel>
                         </td>
                         <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> 
            <td style="width: 980px; height: 200px;" >
            
            <asp:ValidationSummary ID="vsSave" Width="204px" ValidationGroup="actionsave" Height="300px" runat="server" DisplayMode="List" Font-Bold="False" HeaderText="<b>Please correct the errors:</b><br>" />
            
</td>   
                    </tr>
                 </table>
           </div>
         </telerik:RadPageView>  


please help me as i could not able to find the button in code...

thanks.




Princy
Top achievements
Rank 2
 answered on 20 Sep 2010
1 answer
107 views

Hello,

I want to know how to use the datetimepicker with a single botton.
it's means that after I choose the date the timeView will apear.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 20 Sep 2010
2 answers
107 views

When the treeview tries to do a postback after a node edit with this dynamic code:

__doPostBack(

 

'ctl00$ContentPlaceHolder1$SectionsTreeView','{"commandName":"NodeEdit","index":"0","nodeEditText":"BRASS%20Monkey"}')

we get a 'Microsoft JScript runtime error: Object expected'

The html for the start of the treeview is

 

<div id="ctl00_ContentPlaceHolder1_SectionsTreeView" class="RadTreeView RadTreeView_WebBlue">

 

 

 

 

 so the object name seems OK.

What's going wrong and more impartantly how do I fix it?

Dale
Top achievements
Rank 1
 answered on 19 Sep 2010
7 answers
168 views
http://www.telerik.com/help/aspnet-ajax/menu_appearancecreatingacustomskin.html

the above link point to a "Tutorial: Creating A Custom Skin", but that is based on your older version of controls. your newer version is using "rmSprite.png" and no longer use "Menu|MenuBackGround.gif" etc and css structure seems to change a lot becuase I can't find the nodes that are mentioned in the above tutorial.  This makes the above tutorial almost useless.  Is there a newer version?  where is it?  Thanks.
R
Top achievements
Rank 1
 answered on 19 Sep 2010
0 answers
91 views

Hello,

 

I've installed Visual Web Developer Express 2010 and Telerik ASP .NET Ajax Controls.

 

I'm trying to follow a tutorial.

At a certain point it says : "Add a RadMenu to the top of the web page."

I guess I have to drag and drop it from the Toolbox ? I think I've already seen someone doing this a year ago.

But my problem is : I have no Telerik's Rad controls in my toolbox and I have no idea how I'm supposed to add them.

 

Thank you if you can help.

Xrcr
Top achievements
Rank 1
 asked on 19 Sep 2010
0 answers
198 views
Dears,
me and my team colleagues have faced a very strange issue withthe RadComboBox with items bouded in ItemTemplate controls,
Our UI design Case is:
we have a radComboBox with items bouded into ItemTemplate controls in the server side with a datasource of
Lookup type (Key, Value). This rad combobox is placed in a rad update panel and set to autopostback = true.
It has another dependent comboboxes should be filtered on each user closing of the combobox with his/her checked items.
The item template contains ASP checkBox represents the data text and a hidden field represents the data Key.
After the user check some of the comboBox checkboxes and leave this control out, a client side function is called to collect the user checked items and show them in the combobox Text as comma separeated string. in addition, the combobox when is autopostback true should be notified that the user has selectedItemChanged so that the server side event (onSelectedIndexChanged) should be called after each user closig of the combobox control.
The Problem is:
The server side event is not called all the time after leaving the combobox. we supposed that the combobox know that the selectedIndexChanged when we write (comboBoxClientObj.set_selectedItem(0);) or any similier code re set the selected item in the client side so that firing the server side event.
Unfortuanitly, the server side onSelectedIndexChanged is not called on checking the Text#1, while called on all other cases !!
Our Code related part:
* on .ASCX

<

 

telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

 

<script type="text/javascript">

 

function CheckAll_CCRLoadChartFilter_Location() {

 

var chkboxs_Location = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");

 

 

for (var i = 0; i < chkboxs_Location.length - 1; i++) {

 

 

        if (document.getElementById(chkboxs_Location[i]) != null) {

        document.getElementById(chkboxs_Location[i]).checked = document.getElementById(chkboxs_Location[0]).checked;

        }

    }

 

}

 

function RemoveCheckAll_CCRLoadChartFilter_Location() {

 

 

var chkboxs_Location = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");

 

 

var d = $find("<%= ddlLocation.ClientID %>")

d.set_selectedItem(0)

document.getElementById(chkboxs_Location[0]).checked =

 

false;

}

 

 

function SetTextOfTheLocationComboBox_CCRLoadChartFilter(sender, eventArgs) {

 

 

var chkboxsLocation = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");

 

 

var selectedLocation = "";

 

 

for (var i = 0; i < chkboxsLocation.length - 1; i++) {

 

 

var chkedItemLocation = document.getElementById(chkboxsLocation[i]);

 

 

var chkedItem_All_Location = document.getElementById(chkboxsLocation[0]);

 

 

if (chkedItemLocation != null && chkedItemLocation.checked) {

 

 

if (chkedItem_All_Location != null && chkedItem_All_Location.checked) {

selectedLocation = chkedItem_All_Location.nextSibling.firstChild.data;

sender.set_text(selectedLocation);

 

return;

}

selectedLocation = selectedLocation + chkedItemLocation.nextSibling.firstChild.data +

",";

 

}

}

 

if (selectedLocation == "")

selectedLocation =

 

"..."

 

else {

document.getElementById(

 

"<%= tdLocation.ClientID %>").title = selectedLocation;

 

 

if (selectedLocation.length > 25) {

selectedLocation = selectedLocation.substring(0, 22) +

 

"...";

}

}

 

sender.set_text(selectedLocation);

}

 

 

function SetTextOfTheLocationComboBox_CCRLoadChartFilter_Close(sender, eventArgs) {

 

 

var chkboxsLocation = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");

 

 

var selectedLocation = "";

 

 

for (var i = 0; i < chkboxsLocation.length - 1; i++) {

 

 

var chkedItemLocation = document.getElementById(chkboxsLocation[i]);

 

 

var chkedItem_All_Location = document.getElementById(chkboxsLocation[0]);

 

 

if (chkedItemLocation != null && chkedItemLocation.checked) {

 

 

if (chkedItem_All_Location != null && chkedItem_All_Location.checked) {

selectedLocation = chkedItem_All_Location.nextSibling.firstChild.data;

sender.set_text(selectedLocation);

 

return;

}

selectedLocation = selectedLocation + chkedItemLocation.nextSibling.firstChild.data +

 

",";

}

}

 

if (selectedLocation == "")

selectedLocation =

 

"..."

 

else {

document.getElementById(

 

"<%= tdLocation.ClientID %>").title = selectedLocation;

 

 

if (selectedLocation.length > 25) {

selectedLocation = selectedLocation.substring(0, 22) +

 

"...";

}

}

 

sender.set_text(selectedLocation);

}

 

 

</script>

</

 

telerik:RadScriptBlock>

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel11">

 

<table width="235px" dir="rtl" style="text-align: left">

 

<tr>

 

    <td>

 

        <telerik:RadComboBox Width="100%" ID="ddlLocation" runat="server" Skin="Office2007"

 

        MaxHeight="150px" AutoPostBack="true" CausesValidation="false" OnItemDataBound="ddlLocation_ItemDataBound"

 

        OnClientSelectedIndexChanged="SetTextOfTheLocationComboBox_CCRLoadChartFilter_Close"  OnSelectedIndexChanged="ddlLocation_OnSelectedIndexChanged"

 

        OnClientLoad="SetTextOfTheLocationComboBox_CCRLoadChartFilter">

 

            <ItemTemplate>

 

                <asp:CheckBox ID="chkDropLocationItem_CCRLoadChartFilter" AutoPostBack="false" Checked="true"

 

                        runat="server" Text='<%# Eval("Value")%>' />

 

                <asp:HiddenField ID="hdnDropLocationItem_CCRLoadChartFilter" runat="server" Value='<%# Eval("Key")%>' />

 

            </ItemTemplate>

 

            <CollapseAnimation Type="OutQuint" Duration="0"></CollapseAnimation>

 

        </telerik:RadComboBox>

 

    </td>

 

</tr>

 

</table>

</

 

telerik:RadAjaxPanel>

 

 

* on .CS

 

protected override void OnPreRender(EventArgs e)

 {

 

 

 

ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "Register_CCRLoadChart_checkBoxsLocation_ID", "<script> var Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs='" + CheckBoxesLocationIds + "';</script>", false);

 

 

base.OnPreRender(e);

}

 

 

protected void Page_Load(object sender, EventArgs e)

{

 

    if (!this.IsPostBack)

    {

    FillLocationLookup();

 

    }  

 

 

}

 

 

protected

 

void ddlLocation_ItemDataBound(object sender, RadComboBoxItemEventArgs e)

 

 {

 

 

CheckBox chk = e.Item.FindControl("chkDropLocationItem_CCRLoadChartFilter") as CheckBox;

 

 

if (chk != null)

{

 

if (e.Item.Index == 0)

chk.Attributes[

"onClick"] = "CheckAll_CCRLoadChartFilter_Location()";

 

 

else

 

 

chk.Attributes[

"onClick"] = "RemoveCheckAll_CCRLoadChartFilter_Location()";

 

 

if (!CheckBoxesLocationIds.Contains(chk.ClientID))

CheckBoxesLocationIds += chk.ClientID +

 

",";

}

}

 

 

protected void ddlLocation_OnSelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

{

 

List<String> selectedLocation = new List<String>();

 

 

foreach (RadComboBoxItem item in ddlLocation.Items)

{

 

CheckBox chk = item.FindControl("chkDropLocationItem_CCRLoadChartFilter") as CheckBox;

 

 

HiddenField hdnField = item.FindControl("hdnDropLocationItem_CCRLoadChartFilter") as HiddenField;

 

 

if (chk != null && hdnField != null && chk.Checked && !String.IsNullOrEmpty(hdnField.Value))

{

 

if (hdnField.Value == Constants.AllLocation_Key)

{

selectedLocation.Add(

 

Constants.AllLocation_Key);  

 

 

break;

}

 

else

 

 

{

selectedLocation.Add(hdnField.Value);

}

}

}

FilterParameters filterParameters = (((IAdvanceSearch)Page).Parameters);  

 

 

List<string> courts = filterParameters.Courts; ;

 

CourtNodeTree courtNameTree = FiltersManager.CurrentUserCourtNodeTree.GetCourtNameTree(courts.ToArray());

 

 

List<LookupItem> lookupCourtType = new List<LookupItem>();

 

 

string[] classification = new string[1];

classification[0] = filterParameters.Classificaton;

lookupCourtType = courtNameTree.GetCourtTypeNodes(selectedLocation.ToArray(), classification);

 

if (lookupCourtType.Count > 0)

{

lookupCourtType.Sort(

 

new LookupItemComparer());

lookupCourtType.Insert(0,

 

new LookupItem(Constants.AllCourtsType_Key, Constants.AllCourtsType_Value));

FillDropDown(lookupCourtType, ddlCourtType);

}

 

else

 

 

{

ddlCourtType.Items.Clear();

ddlCourtType.ClearSelection();

}

}

yours comments and fix will be highly apprieciated,

Regards,
Samar hamdan.





Samar Hamdan
Top achievements
Rank 1
 asked on 19 Sep 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?