Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
122 views
I posted earlier about the conditional change of colors for rows but specifically the issue is the values are coming up as a html space.
The value of the data-bound cells are Boolean so how do i get the value on databind when they are essentially now checkboxes?
really stuck here, any help would be appreciated.

If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = e.Item 
'how do i get the value of the Boolean databound column??? 
'this does not work - it only produces a string of " " 
if dataBoundItem("Ready").Text = x then 
end if 
 
End If 


UPDATE: figured it out. for those looking for a solution. 
If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = DirectCast(e.Item, GridDataItem) 
                Dim cbPause As CheckBox = dataBoundItem("Pause").Controls.Item(0) 
'get val of check box 
 
end if 
Daniel
Telerik team
 answered on 11 Jun 2009
1 answer
89 views
Hello,

I have a grid that i wish to export ot excel.
The code is seemingly straight forward

 

protected void Button1_Click(object sender, EventArgs e)
        {
            radDeferredIncome.ExportSettings.IgnorePaging = true;
            radDeferredIncome.ExportSettings.OpenInNewWindow = true;
            radDeferredIncome.ExportSettings.ExportOnlyData = true;
            radDeferredIncome.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
 
            radDeferredIncome.MasterTableView.ExportToExcel();
        }

The problem is any column that is of type string does not show up in excel.  All the bounnd and numeric columns that have a type of Int32 do.  Has anyone else had this issue?  Is there a fix?


Thanks

John

 

Daniel
Telerik team
 answered on 11 Jun 2009
1 answer
201 views
I am trying to change the rows back and foreground color based on data gleaned from cells. I have tried the below code but the cell data being returned is " " not the Boolean i was expecting from the sql data bound cells.

what am i doing wrong?

Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound 
        Try 
            If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = e.Item 
 
                Debug.WriteLine(dataBoundItem("pause").Text) 
                Dim rclr As Drawing.Color 
                Dim tclr As Drawing.Color 
                If dataBoundItem("pause").Text = True Then 
                    rclr = Drawing.Color.DarkOrange 
                    tclr = Drawing.Color.Black 
                    GoTo RowSet 
                End If 
                If dataBoundItem("ready").Text = True And dataBoundItem("run").Text = True And dataBoundItem("done").Text = True Then 
                    'done 
                    rclr = Drawing.Color.Black 
                    tclr = Drawing.Color.Gray 
                ElseIf dataBoundItem("ready").Text = True And dataBoundItem("run").Text = True And dataBoundItem("done").Text = False Then 
                    'running  
                    rclr = Drawing.Color.DarkSalmon 
                    tclr = Drawing.Color.Black 
 
                ElseIf dataBoundItem("ready").Text = True And dataBoundItem("run").Text = False And dataBoundItem("done").Text = False Then 
                    'ready 
                    rclr = Drawing.Color.DarkOliveGreen 
                    tclr = Drawing.Color.Black 
                Else 
                    'not set, dont change a thing, well maybe do it incase 
                    rclr = Drawing.Color.Black 
                    tclr = Drawing.Color.White 
                End If 
RowSet: 
                Dim Row As TableRow 
                Row = CType(e.Item, TableRow) 
                Row.BackColor = rclr 
                Row.ForeColor = tclr 
            End If 
 
        Catch ex As Exception 
 
        End Try 
    End Sub 
 
Daniel
Telerik team
 answered on 11 Jun 2009
3 answers
200 views
I have fileupload1 being used by client to upload excel file to radgrid and then to DB.  Problem is the fileupload reads the server location and not the client location of the file before uploading to the radgrid.  So not really sure what to do?  I've researched some people saying it isn't possible to read the location of client side due to security but it's the client side upload so don't know why that wouldn't work.  Here is some of my code because it still reads from server so I don't know what else to do.

    protected void btnView_Click(object sender, EventArgs e)  
    {  
        string filename = FileUpload1.FileName.ToString();  
        this.ocAccounts = this.oExcelHelper.LoadExcel(filename);  
        rgBulkEntry.DataSource = this.ocAccounts;  
        rgBulkEntry.DataBind();  
        Session.Add("Accounts"this.ocAccounts);  
    } 

permissions on that server have been granted to network service and aspnet....

Thanks in advance.
Jon-Jon Kershaw
Top achievements
Rank 2
 answered on 11 Jun 2009
2 answers
144 views
Hi,

I want to show one confirmation message on changing the combobox item for only one particlar item. I want to cancel the selection if clicked on cancel. Can i do this on client side using javascript? any help is appreatiated.
Benjamin
Top achievements
Rank 1
 answered on 11 Jun 2009
1 answer
96 views
I just upgraded to the newest release in an attempt to fix another problem, now the trigger for closing my dock does not work.

I have it setup just like the example, it is fired when I move a dock, but for some reason the close does not fire the save method.

Here is my code which is straight from the example

AsyncPostBackTrigger saveStateTrigger = new AsyncPostBackTrigger(); 
saveStateTrigger.ControlID = dock.ID; 
saveStateTrigger.EventName = "DockPositionChanged"
UpdatePanel1.Triggers.Add(saveStateTrigger); 
 
saveStateTrigger = new AsyncPostBackTrigger(); 
saveStateTrigger.ControlID = dock.ID; 
saveStateTrigger.EventName = "Command"
UpdatePanel1.Triggers.Add(saveStateTrigger); 


Thanks
David Moore
Top achievements
Rank 1
 answered on 11 Jun 2009
2 answers
1.7K+ views
Does the Telerik.Web.UI.DialogHandler.aspx file exist as an independent file? And, if so, what directory does it reside in?

I have a url rewrite handler which is somehow messing up the dialogs. I have tried bypassing the url rewrite, but for some reason the dialogHandler.aspx file is being sought in one of my directories, and it does not exist anywhere within my solution.

-Ken Williams
mstevens
Top achievements
Rank 1
 answered on 11 Jun 2009
2 answers
109 views
Hi, I'm working with a RadGrid on a web application, and I'm usin the EditFormSettings to customize the Edit Form in my grid, inside I have 2 checkboxes and I would like to get the value of that controls so then when CheckBox1 is True, the other one must be False. I used to do this with a formview typing this code:
Dim CheckBox1 As CheckBox = Ctype(FormView.FindControl("CheckBox1"), CheckBox)

but now with this RadGrid I cant get the value, hope anyone could help me
Dany V
Top achievements
Rank 1
 answered on 11 Jun 2009
8 answers
223 views
I'm in the process of upgrading my controls to the newest release, but I noticed on my menu at the bottom of the page there is a Sys.Application.add_init function that wasn't there before, and it seems to be iterating through all the navigation items again! it has already rendered them to the page so why does it add all that stuff at the bottom again?

thanks!
SelAromDotNet
Top achievements
Rank 2
 answered on 11 Jun 2009
2 answers
154 views
Hello,

I could use a little assistance here since I can't seem to figure this out. Here's what I'm trying to achieve...

I have a RadMultiPage with 2 pages inside a .NET LoginView control. In the AnonymousView, PageView1 has a link called Login. When clicked, I need to switch to PageView2 using JavaScript. I need to do it this way instead of an AJAX callback because I want to set a timer to switch back to PageView1 after a certain amount of time.

My issue right now is that I can't seem to figure out how to access the RadMultiPage in JavaScript when it's inside the LoginView control.

Can someone explain to me how to do that? Thanks in advance!
Philip Senechal
Top achievements
Rank 1
 answered on 11 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?