Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
431 views

Hi,

I,m using RadComboBox with multi columns like “EmployeeStatus” & “StatusID”  and applying search on both the  columns. Once I have selected an employee status, saving StatusID of that status in the database. Its working fine. But my problem is that if I,m loading that statusID from the database and again binding radcomboBox with this id and doing selected true for that id, its not working.

CS Code:

 protected void cboMEStatus_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
           List<bocWFEmployeeStatusCollection> listEmpStatus = objlibWFDALController.GetEmployeeStatus();
            if (listEmpStatus != null)
            {
                var status = Enumerable.Empty<bocWFEmployeeStatusCollection>();

                if (utlTypeChecking.IsNumeric(temp))
                {
                    status = from data in listEmpStatus
                             where data.Employee_Status_ID.ToString().StartsWith(temp)
                             select data;

                }
                else
                {
                    status = from data in listEmpStatus
                             where data.Employee_Status_Value.StartsWith(temp, StringComparison.OrdinalIgnoreCase)
                             select data;

                }
                foreach (var item in status)
                {
                    RadComboBoxItem radItem = new RadComboBoxItem();
                    radItem.Text = item.Employee_Status_Value;
                    radItem.Value = item.Employee_Status_ID.ToString();

                    radItem.Attributes.Add("Employee_Status_ID", item.Employee_Status_ID.ToString());
                    cboMEStatus.Items.Add(radItem);
                    radItem.DataBind();
                }

            }
        }

HTML Code:

 <HeaderTemplate>
                                                                <table style="width: 200px" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                        <td style="width: 100px;">
                                                                            Status Description
                                                                        </td>
                                                                        <td style="width: 80px;">
                                                                            Status ID
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <table border="0" style="width: 200px" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                        <td style="width: 100px;">
                                                                            <%# DataBinder.Eval(Container, "Text")%>
                                                                        </td>
                                                                        <td style="width: 80px;">
                                                                            <%# DataBinder.Eval(Container, "Attributes['Employee_Status_ID']")%>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>

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

 cboMEStatus.FindItemByValue(statusRef.ToString()).Selected = true;

 where statusRef.ToString() is coming from database.

How to Show selected text in combobox with this id.

Please Help

Regards

Ravi

Kalina
Telerik team
 answered on 14 Jul 2010
1 answer
124 views
Hi, 
We are using Telerik ASP.NET AJAX licensed version.
We designed two separate activeX controls for registration and identification of fingerprints using OTID and One touch windows SDK. 

Developer PC works in win XP with IE6, and we implement the control in the IIS of our static IP and access it from a client. 

It works only in IE6, but the control is not loaded in IE8, mozilla and chrome. 
We build this to work under any CPU option.



Dimo
Telerik team
 answered on 14 Jul 2010
1 answer
453 views
I am doing a mock up of a web app and I need to display the columns of the Grid without a Datasource or records, basically I just need the grid to display for look and feel purposes. So far I can't get anything to show but a blank space.

Thanks!
Sam
Dimo
Telerik team
 answered on 14 Jul 2010
2 answers
158 views
If I choose a Date from a DateTimePicker, the time will default to the mid night of the date of my choice, for example "7/14/2010 12:00am"
Is there any way I can set a default value for the time such as "7/14/2010 9:00am" by just selecting the date, without selecting time ?

Thanks
Li Zhou
Top achievements
Rank 1
 answered on 14 Jul 2010
1 answer
487 views
Hi,

I am using Gridclientselectcoiumn in my radgrid. I have a label in my commanditemtemplate.  When user checks checkbox i just want to show number of checkboxes selected in that label. Suppose If user selects 4 checkboxes i just want to show like Selected Records: 4.  Here is my code for that......

Grid client select column....
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"  HeaderStyle-Width="3%"  ItemStyle-Width="3%">
 <HeaderStyle Width="3%"></HeaderStyle>
 <ItemStyle Width="3%"></ItemStyle>
</telerik:GridClientSelectColumn>

commanditemtemplate

<CommandItemTemplate>
   <td align="right" style="width: 20%">
Selected Records:<asp:Label ID="lblselTsks" Width="20px" Font-Size="10pt" Font-Bold="true" runat="server" Text="0"></asp:Label>
   </td>
</CommandItemTemplate>


codebehind and JS

protected void rg200_DataBound(object sender, EventArgs e)
    {
        foreach (GridDataItem item in rg200.MasterTableView.Items)
        {
            CheckBox chkBoxOne = (CheckBox)item.FindControl("ClientSelectColumn");
            if (chkBoxOne != null)
                chkBoxOne.Attributes.Add("onclick", "javascript:return SelectOne('" + chkBoxOne.ClientID + "')");
        }
    }
 
 
JS
 
 
function SelectOne(id) {
                var count = 0;
                count = Number(document.getElementById('ctl00_PagePlaceholder_rg200_ctl00_ctl02_ctl00_lblselTsks').innerHTML);
                if (document.getElementById(id).checked == true) {
                    if (!document.getElementById(id).disabled) {
                        count = count + 1;
                    }
                }
                else if (document.getElementById(id).checked == false) {
                    if (!document.getElementById(id).disabled) {
                        count = count - 1;
                    }
                }
                document.getElementById('ctl00_PagePlaceholder_rg200_ctl00_ctl02_ctl00_lblselTsks').innerHTML = count;
            }


The problem is when i select checkbox  like 1 or more, the selected checkboxes count is not displaying. Its always showing Selected Records: 0.( See the image). Where am i doing wrong? How to resolve this issue. Any help should be appreciated.
Princy
Top achievements
Rank 2
 answered on 14 Jul 2010
1 answer
135 views
Hi, I have a grid wrapped with Ajax Panel.
The grid has links to open radwindow.

After open and close a few radwindows, I get JS error as screen cap.
http://img534.imageshack.us/img534/8503/permissiondeniedtelerik.png

What could be the cause?

Thanks.
Georgi Tunev
Telerik team
 answered on 14 Jul 2010
7 answers
305 views
Hi,

I have a Radgrid which has an edit button. On click this opens a RadWindow which has a seperate aspx page.
To open this RadWindow, I have been the below mentioned code to show data in the RadWindow:

function ShowEditForm(id, rowIndex) {
var grid = $find("<%= grdStoryList.ClientID %>");

var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);

window.radopen("StoryObservedTypePopup.aspx?Id=" + id, "UserListDialog");
return false;
}

I would like like multiple query string via:
window.radopen("StoryObservedTypePopup.aspx?Id=" + id, "UserListDialog");

These new query string parameters are columns in the radgrid itself.

Can any one please suggest?

Thanks

Georgi Tunev
Telerik team
 answered on 14 Jul 2010
1 answer
201 views
Hi,

 Is there any way to hide the status bar message (not status bar) that will be showing the address of the page in RadWindow.
 
I cam to know there is an option to hide the status bar itself, but how can we manipulate the messages inside that ? 


Thank in Adv.
-- Omm --
Georgi Tunev
Telerik team
 answered on 14 Jul 2010
3 answers
156 views
Hi,

I am using 2 RadGrids (master/detail) and RadAjaxManager to Ajaxify master detail loading and editing.

To edit the rows in the detail grid I use template columns with asp:Link controls for three different scenarios.

1> Edit (this opens a RadWindow with an edit form)
2> Deactivate/Activate (this opens a different RadWindow for confirmation) - Status column
3> Show/Hide (this also opens a RadWindow for confirmation) - Status column

There is also a Deactivate/Reactivate all link in the filteritem for a Status column (along with a RadComboBox for filtering).

All this functionality is working as desired with the details grid updated using Ajax on row select from the master grid and the filter combobox and various other buttons on the page updating the details grid correctly.

On closing the various Edit/Confirm windows I use a client-side AjaxRequest("Rebind") and handle the ajax request server-side with the ajax manager's OnAjaxRequest event handler (as demonstrated in various Telerik demos).

My one remaining issue is due to the fact that when returning from the "Edit" window I need to update the master grid as well as the detail grid to update various aggregate columns for the master grid. For all the "Confirm" windows, only the details grid needs to be updated.

<telerik:RadAjaxManager runat="server" ID="ramResourceManagement" OnAjaxRequest="ramResourceManagement_AjaxRequest">
    <AjaxSettings>
...
        <telerik:AjaxSetting AjaxControlID="ramResourceManagement">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="gridUnits" LoadingPanelID="ralpResourceManager" />
                <telerik:AjaxUpdatedControl ControlID="gridResources" LoadingPanelID="ralpResourceManager" />
                <telerik:AjaxUpdatedControl ControlID="headerPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
...
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="ralpResourceManager" runat="server" EnableEmbeddedSkins="false" />

Using the above code for the radajaxmanager settings I update the controls correctly when a detail row (resource) is edited. But, of course, when a resource is deactivated or hidden etc. the master (unit) grid is also retrieved with the Ajax update (not updated but still adding large size to the response)

 I have used RadAjaxWithTarget to update only the resource grid from other controls on the page (asp buttons with onclientclick and onclick event handlers and relevant radajaxmanager settings for the button controls) but when attempting to do this on return from window close I am unsure of what target to use or what arguments.

I attempted to add a "refresh grid" button with Visible="false" and use this as the target then perform the grid refresh in it's onclick event handler as follows:

Script called on window close:
function RefreshResourceGrid()
{               
    $find("<%=ramResourceManagement.ClientID %>").ajaxRequestWithTarget("<%= btn_refreshGrid.UniqueID %>", "");
}

Relevant RadAjaxManager Settings and button control:
        <telerik:AjaxSetting AjaxControlID="btn_refreshGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="gridResources" LoadingPanelID="ralpResourceManager" />
            </UpdatedControls>
        </telerik:AjaxSetting>
 
<asp:Button runat="server" ID="btn_refreshGrid" OnClick="btn_refreshGrid_Click" CausesValidation="false" Visible="false"/>

Code behind:
protected void btn_refreshGrid_Click(object sender, EventArgs e)
{
    BindResources();
}

Unfortunately this causes a full postback despite the ajax settings suggesting an ajax update on only the resources grid should be performed.

Any ideas?

Jason
Top achievements
Rank 1
 answered on 14 Jul 2010
2 answers
165 views
Hi Telerik,

Am using the old Q42006 controls. Am facing the issue that the alignment o ftext in the telerik TreeView Controls.

The text always aligning at top, Am binding image and text. so the text always align at top it looks not nice. could you please let me know where to set the property of alignment node text to middle?

Please help me.....
Padmaja
Top achievements
Rank 1
 answered on 14 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?