Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
1.7K+ views
Hi

I can't filter column on my radGrid

<telerik:RadGrid runat="server" ID="grid"    
                       AllowPaging="true"
                       AllowSorting="True"
                       AllowFilteringByColumn="True"
                       ShowStatusBar="true"
                       AutoGenerateColumns="false"
                       Visible="false">
 
                       <ClientSettings >
                           <Selecting AllowRowSelect="True"/>
                           <ClientEvents OnRowDblClick="OnRowDblClick" />
                       </ClientSettings>
 
                       <PagerStyle Mode="NumericPages" Position="Bottom"  />
                       <GroupingSettings CaseSensitive="false" />
    
                       <MasterTableView  ShowHeadersWhenNoRecords="true" DataKeyNames="Name"  ClientDataKeyNames="Name">
 
                       <Columns>
                           <telerik:GridBoundColumn DataField="Name" UniqueName="Name" HeaderText="Name"
                           DataType="System.String" AutoPostBackOnFilter="true" SortExpression="Name" >
                           </telerik:GridBoundColumn>
 
                           <telerik:GridBoundColumn DataField="FirstName" UniqueName="FirstName" HeaderText="Firstname"
                           DataType="System.String" AutoPostBackOnFilter="true" SortExpression="Firstname" >
                           </telerik:GridBoundColumn>
 
                           <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="Edit">
                           </telerik:GridEditCommandColumn>
                       </Columns>
                       </MasterTableView>   
                       </telerik:RadGrid>


protected void button_Click(object sender, EventArgs e)
 {        
             DataTable dt;
             SqlConnection conn = new SqlConnection();
             SqlCommand command = new SqlCommand("fillGrid", cn);
             command.CommandType = CommandType.StoredProcedure;
 
             SqlParameter p = new SqlParameter("@param", SqlDbType.NVarChar, 50);
             p.Value = var.Text;
             command.Parameters.Add(p);
 
             dt = new DataTable();
             SqlDataAdapter da = new SqlDataAdapter(cmd);
 
             try
             {
                 conn.Open();
                 da.Fill(dt);
                 grid.DataSource = dt;
                 grid.DataBind();
             }
             catch ()
             {
                 //...
             }
             finally
             {
                 if (conn.State != ConnectionState.Closed)
                 {
                     conn.Close();
                 }
             }
         }
Caro
Top achievements
Rank 1
 answered on 08 May 2012
3 answers
954 views
Below is the code snippet.
I have tried doing everything from setting the z-index to css. But the issue still persists.

The datepicker calendar is not shown when i try to open in modal popup window.
I am using RadControls_Q1_2007_SP2_dev. My client does not want to upgrade to latest version immediately.
Please help.

<style type="text/css">
        .modalBackground
        {
            background-color: Black;
            filter: alpha(opacity=90);
            opacity: 0.8;
            z-index: 0;
        }
        .modalPopup
        {
            background-color: #FFFFFF;
            border-width: 3px;
            border-style: solid;
            border-color: black;
            padding-top: 10px;
            padding-left: 10px;
            width: 720px;
            height: 260px;
            z-index: 1;
        }
        .modalPopupAdd
        {
            background-color: #FFFFFF;
            border-width: 3px;
            border-style: solid;
            border-color: black;
            padding-top: 10px;
            padding-left: 10px;
            width: 720px;
            height: 360px;
            z-index: 1;
        }
        .radCalendarPopup
        {
            z-index: 30000 !important;
        }
    </style>
 
<ajax:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:LinkButton ID="lnkAdd" runat="server" Text="Add Ashram Events" OnClick="Add"
                                CssClass="copy"></asp:LinkButton><br />
<asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" Style="display: none">
 <table width="98%" cellspacing="0" cellpadding="0" class="table-border" id="tblAddEdit"
                                    runat="server" visible="false">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="2" class="main-content">
                                                <tr>
                                                    <td>
                                                        <table width="100%" border="1" cellspacing="0" cellpadding="2">
                                                            <tr>
                                                                <td height="25" colspan="4" align="center" class="sub-menu2" style="padding-left: 10px;
                                                                    background-color: Yellow">
                                                                    <asp:Label ID="lblHeading" runat="server"></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td colspan="4" class="sub-menu2" style="padding-left: 10px; color: #790020; background-color: #f9f9f9">
                                                                    <u>Shibir Details</u>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Shibir Type</b> :
                                                                </td>
                                                                <td colspan="3" class="sub-menu2" style="height: 20px; padding-left: 10px; color: Black;
                                                                    font-size: 9px; font-family: Verdana, Times New Roman">
                                                                    <asp:TextBox ID="txtShibirType" runat="server" Width="300px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>From Date</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black;">
                                                                    <telerik:RadDatePicker ID="rdpFromDate" Calendar-Skin="WebBlue" runat="server" Width="150px"
                                                                        DateInput-Enabled="false" ClientEvents-OnPopupOpening="PopupOpening">
                                                                        <DatePopupButton HoverImageUrl="~/RadControls/Calendar/Skins/Sunny/Img/datePickerPopupHover.gif"
                                                                            ImageUrl="~/RadControls/Calendar/Skins/Sunny/Img/datePickerPopup.gif"></DatePopupButton>
                                                                    </telerik:RadDatePicker>
                                                                    <script type="text/javascript">
                                                                        function PopupOpening(sender, args) {
                                                                            Telerik.Web.UI.Calendar.Popup.zIndex = 100100;
                                                                        }
                                                                    </script>
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>To Date</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black;">
                                                                    <telerik:RadDatePicker ID="rdpToDate" Calendar-Skin="WebBlue" runat="server" Width="150px"
                                                                        DateInput-Enabled="false" ZIndex="11000">
                                                                        <DatePopupButton HoverImageUrl="~/RadControls/Calendar/Skins/Sunny/Img/datePickerPopupHover.gif"
                                                                            ImageUrl="~/RadControls/Calendar/Skins/Sunny/Img/datePickerPopup.gif"></DatePopupButton>
                                                                    </telerik:RadDatePicker>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Location</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black; font-size: 9px; font-family: Verdana, Times New Roman;">
                                                                    <asp:TextBox ID="txtLocation" runat="server" Width="175px"></asp:TextBox>
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Address</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black; font-size: 9px; font-family: Verdana, Times New Roman">
                                                                    <asp:TextBox ID="txtAddress" runat="server" Width="175px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Shibir Language</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black; font-size: 9px; font-family: Verdana, Times New Roman">
                                                                    <asp:TextBox ID="txtShibirLanguage" runat="server" Width="175px"></asp:TextBox>
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Timings</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black; font-size: 9px; font-family: Verdana, Times New Roman">
                                                                    <asp:TextBox ID="txtTimings" runat="server" Width="175px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Last Date of Registration</b> :
                                                                </td>
                                                                <td colspan="3" height="40" class="sub-menu2" style="padding-left: 10px; color: Black;">
                                                                    <telerik:RadDatePicker ID="rdpRegistrationLastDate" Calendar-Skin="WebBlue" runat="server"
                                                                        Width="150px" DateInput-Enabled="false" ZIndex="11000">
                                                                        <DatePopupButton HoverImageUrl="~/RadControls/Calendar/Skins/Sunny/Img/datePickerPopupHover.gif"
                                                                            ImageUrl="~/RadControls/Calendar/Skins/Sunny/Img/datePickerPopup.gif"></DatePopupButton>
                                                                    </telerik:RadDatePicker>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td colspan="4" class="sub-menu2" style="padding-left: 10px; color: #790020; background-color: #f9f9f9">
                                                                    <u>Other Details</u>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Contact Person</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black; font-size: 9px; font-family: Verdana, Times New Roman">
                                                                    <asp:TextBox ID="txtContactPerson" runat="server" Width="175px"></asp:TextBox>
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Contact Details</b> :
                                                                </td>
                                                                <td class="sub-menu2" style="padding-left: 10px; color: Black; font-size: 9px; font-family: Verdana, Times New Roman">
                                                                    <asp:TextBox ID="txtContactDetails" runat="server" Width="175px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 25px">
                                                                <td class="sub-menu2" style="padding-left: 10px">
                                                                    <b>Other Details</b> :
                                                                </td>
                                                                <td colspan="3" height="40" class="sub-menu2" style="padding-left: 10px; color: Black;
                                                                    font-size: 9px; font-family: Verdana, Times New Roman">
                                                                    <asp:TextBox ID="txtOtherDetails" runat="server" Width="450px" TextMode="MultiLine"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="4" align="center">
                                                                    <asp:Button ID="btnSave" runat="server" Text="Save" /> 
                                                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="return Hidepopup()" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                            <asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
                            <ajaxToolkit:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit"
                                TargetControlID="lnkFake" BackgroundCssClass="modalBackground">
                            </ajaxToolkit:ModalPopupExtender>
                        </ContentTemplate>
                        <Triggers>
                            <ajax:AsyncPostBackTrigger ControlID="dgAshramEvents" />
                            <ajax:AsyncPostBackTrigger ControlID="btnSave" />
                        </Triggers>
                    </ajax:UpdatePanel>
Manish
Top achievements
Rank 1
 answered on 08 May 2012
6 answers
340 views
Hi,

I have

<

 

telerik:RadListBox CheckBoxes="true"> On check of Checkbox I want enble and disable the buttons. I need to catch the checkbox click event at the server side. How can I implement this?

Regards,
Medac

 

Princy
Top achievements
Rank 2
 answered on 08 May 2012
0 answers
92 views
Hi,

Can we enable searching of records in radlistbox , in case of large number of records it is difficult to search any specefic record manually. (rad grids provide this feature)

If there is possible solution pls help me on it.

Thanks,
Saurabh
Saurabh
Top achievements
Rank 1
 asked on 08 May 2012
4 answers
135 views
Not sure why, but enabling Single Input on the RadMaskedTextBox breaks it. You can't type in the textbox, but if you paste in it it formats the input correctly. 

For example: 
<form id="form1" runat="server">
<asp:ScriptManager runat="server">
</asp:ScriptManager>
<div>
    <telerik:RadMaskedTextBox ID="MaskTest" runat="server" Mask="(###) ###-####" EnableSingleInputRendering="true"
        HideOnBlur="true">
    </telerik:RadMaskedTextBox>
</div>
</form>

pasting a valid telephone number works, but the textbox doesn't allow you to type in it including number. 

Anyone know why this is? 

Regards,
Jacques
Jacques
Top achievements
Rank 2
 answered on 08 May 2012
2 answers
94 views
Hi all.
I have a radtreeview filled from a database in code behind.and a radtreeviewcontextmenu working correctly on the radtreeview.
I've implemented some classical node operations  from client side (add,rename,delete,ecc.) .
Then I access these client changes on server side by ClientChanges  property.
So far so good.

Here's the problem I can't solve..

Client side changes are available on the server side after postback, but I don't want to call a postback with a 
classic button onclick event..I would like to call a postback after every client operation made by contextmenu !
Is it possibile ?
I have everything to get it. All the client functions are ok and the clientchanges routine on code behind calling the database save function.
The only missing link is how to call/invoke a postback from client side to perform the clientchanges routine..
May you help me ? 
Thanks in advance guys
Gabriele


Gabriele
Top achievements
Rank 1
 answered on 08 May 2012
0 answers
86 views
Ignore - PEBKAC - got the wrong Ajax Setting.
Peter
Top achievements
Rank 1
 asked on 08 May 2012
1 answer
83 views
I have a RadWindow that is not modal, however when I click on the parent page of the RadWindow, the RadWindow will not hide. How do I change focus and send the RadWindow behind its parent page?
Princy
Top achievements
Rank 2
 answered on 08 May 2012
1 answer
105 views
In RadComboBox can i modify the vertical scroll bar so the vertical scroll bar just float in top of design without mess my design? Please someone help me. I attach my screenshoot.

Thanks,

Michael
Kate
Telerik team
 answered on 08 May 2012
24 answers
369 views
I just downloaded the trial version and I am trying to config the menu to make it look like the menu on telerik homepage.  Look like it using tabstrip and menu with template?  Can you give me the hints and is there an example? Thanks.
Kate
Telerik team
 answered on 08 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?