15,886,545 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Guruprasad.K.Basavaraju (Top 91 by date)
Guruprasad.K.Basavaraju
19-Dec-14 1:29am
View
I think what he is asking is how do you highlight a field when it is updated? In case you submit the changed data for approval at next level.
Please cut some slack to newbies, we were once new too. Asking the right questions will help them frame their next question the right way and save your time.
Guruprasad.K.Basavaraju
9-May-14 10:20am
View
Great Sunil, you are now an expert with data tables :) Have been busy writing articles but glad you worked it out.
Guruprasad.K.Basavaraju
1-May-14 16:16pm
View
Ok, I never used this one. Let me set up a sample project and try this out sometime today. Hope you can wait on this one.
Guruprasad.K.Basavaraju
1-May-14 16:16pm
View
Deleted
Ok, I never used this one. Let me set up a sample project and try this out sometime today. Hope you can wait on this one.
Guruprasad.K.Basavaraju
1-May-14 13:57pm
View
Great, will take a stab at it tonight Sunil. Been busy with some articles.
Guruprasad.K.Basavaraju
22-Apr-14 15:54pm
View
You are lucky, it looks like there is already an example..
http://datatables.net/blog/Inline_editing
Guruprasad.K.Basavaraju
22-Apr-14 15:45pm
View
You will need to modify the datatable scripts Sunil, I am not sure which methods but its possible with some good amount of effort.
Guruprasad.K.Basavaraju
22-Apr-14 15:35pm
View
http://www.jeasyui.com/tutorial/datagrid/datagrid12.php
Guruprasad.K.Basavaraju
22-Apr-14 12:35pm
View
Hi Balu,
Can you show me the code where you are creating this XML ?
Guruprasad.K.Basavaraju
21-Apr-14 23:08pm
View
Hi sunil, Yes I can see the image now. And I got what you are saying.
This functionality is simple. You need to register a javascript method for onchange event on the dropdown and in the javascript method make an ajax call with the value and bind the datatable again.
Guruprasad.K.Basavaraju
21-Apr-14 23:08pm
View
Deleted
Hi sunil, Yes I can see the image now. And I got what you are saying.
This functionality is simple. You need to register a javascript method for onchange event on the dropdown and in the javascript method make an ajax call with the value and bind the datatable again.
Guruprasad.K.Basavaraju
21-Apr-14 16:21pm
View
Sunil, Confused on whats needed . More info please. Also I cannot access the image so not sure what the issue is.
Guruprasad.K.Basavaraju
21-Apr-14 16:05pm
View
This might be tricky you may need to look at the tabletools source..
Guruprasad.K.Basavaraju
21-Apr-14 15:40pm
View
I guess I lost you, couldnt understand what you mean here. Are you saying u want the data in your PDF to be a hyperlink too ?
Guruprasad.K.Basavaraju
21-Apr-14 15:39pm
View
Sunil, since you are using the serverside Ajax call you cannot replicate the example you quoted. In that example its not the server side data that they are exporting
Guruprasad.K.Basavaraju
21-Apr-14 15:19pm
View
Great, if have the third element then you need the second span else you are right its not necessary.
Also please close this question by accepting the answer.
Guruprasad.K.Basavaraju
21-Apr-14 14:24pm
View
Sunil, Just checked the documentation and the table tools is a client side export using flash so it will not support exporting the whole table and it will always export whats currently displayed on the page. You may need to write your own method for getting the data from server and creating a file. What are the other issues that are currently open ?
Guruprasad.K.Basavaraju
21-Apr-14 14:08pm
View
Sunil, I guess I am having trouble getting the table tools work.. may need to start a new project and see. Will try tonight..
Guruprasad.K.Basavaraju
21-Apr-14 14:05pm
View
Check the updated Solution
Guruprasad.K.Basavaraju
18-Apr-14 23:04pm
View
Why was this answer down voted ??
Guruprasad.K.Basavaraju
18-Apr-14 23:02pm
View
Deleted
Can someone tell me why this answer was down voted?
Guruprasad.K.Basavaraju
18-Apr-14 18:26pm
View
are both lists are of same type ?
Guruprasad.K.Basavaraju
18-Apr-14 17:44pm
View
thanks and good luck!!
Guruprasad.K.Basavaraju
18-Apr-14 17:35pm
View
below link should be your bible.. do refer that often it will greatly help you.. only when you cannot figure it there you post for help..
https://datatables.net/api
Guruprasad.K.Basavaraju
18-Apr-14 17:33pm
View
Great..!!
Good luck..
My new article is here this week.. vote and download if you like..
http://www.codeproject.com/Articles/760609/Beginning-with-HTML-and-CSS-Part-Getting-Fanc
Guruprasad.K.Basavaraju
18-Apr-14 17:25pm
View
Oh sorry, I guess I am reading everything wrong today.. you know what the best way to do this is applying the class when you create the column. Like below. Remove fnDrawCallback that you added before and just use the below one. Notice sClass in the Company_name column
var tab = $('#myDataTable').dataTable({
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": ""
},
"bServerSide": true,
"sAjaxSource": 'AjaxDataProvider',
"bJQueryUI": true,
"aoColumns": [
{"sName": "ID","bVisible":false},
{
"sName": "ID",
"bSearchable": false,
"bSortable": false,
"fnRender": function (oObj) {
}
},
{ "sName": "COMPANY_NAME", "sClass": "hidden-xs" },
{ "sName": "ADDRESS" },
{ "sName": "TOWN" }
]
});
Guruprasad.K.Basavaraju
18-Apr-14 17:09pm
View
Thats what you wanted isn't it ?
Guruprasad.K.Basavaraju
18-Apr-14 16:56pm
View
the below works...
var tab = $('#myDataTable').dataTable({
"sDom": 'T<"clear">lfrtip',
'fnDrawCallback': function () {
$('td:eq(1)').addClass('hidden-xs')
},
"oTableTools": {
"sSwfPath": "your path"
},
"bServerSide": true,
"sAjaxSource": 'AjaxDataProvider',
"bJQueryUI": true,
"aoColumns": [
{"sName": "ID","bVisible":false},
{
"sName": "ID",
"bSearchable": false,
"bSortable": false,
"fnRender": function (oObj) {
return '
Guruprasad.K.Basavaraju
18-Apr-14 16:44pm
View
Let me try this.
Guruprasad.K.Basavaraju
18-Apr-14 16:41pm
View
Can you try inspect element and see what class the TD has now ?
Guruprasad.K.Basavaraju
18-Apr-14 16:27pm
View
Vote Up..!! :)
Guruprasad.K.Basavaraju
18-Apr-14 16:10pm
View
Sorry.. see below..
<script type="text/javascript">
$(document).ready(function () {
$('#myDataTable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": 'DataProvider',
"bJQueryUI": true,
"aoColumns": [
{
"sName": "ID"
},
{ "sName": "COMPANY_NAME" },
{ "sName": "ADDRESS" },
{ "sName": "TOWN" }
]
});
});
$(function() {
$(".table tr").each(function() {
$(this).find('td:eq(2)').addClass("hidden-xs");
});
});
</script>
Guruprasad.K.Basavaraju
18-Apr-14 15:55pm
View
just add the below function after creating the column filter in your script..
$(function() {
$(".table tr").each(function() {
$(this).find('td:eq(2)').addClass("hidden-xs");
});
});
Guruprasad.K.Basavaraju
18-Apr-14 15:55pm
View
Deleted
just add the below function after creating the column filter in your script..
$(function() {
$(".table tr").each(function() {
$(this).find('td:eq(2)').addClass("hidden-xs");
});
});
Guruprasad.K.Basavaraju
18-Apr-14 13:19pm
View
I need to setup a project for this, I haven't used export anytime. How did you solve the previous issue? Was it because of the missing SWF ?
Guruprasad.K.Basavaraju
17-Apr-14 17:39pm
View
Great, Thats because its only looking at the data that is currently displayed on the HTML and exporting it.
By the way what exactly what the issue ?
Guruprasad.K.Basavaraju
17-Apr-14 13:43pm
View
Sunil, Please click reply on my message :) else I would not know you asnwered my query.
Can you run this in chrome and click inspect element and see if the swf files are loaded ?
Guruprasad.K.Basavaraju
16-Apr-14 20:54pm
View
What version of tabletools have you imported ?
Guruprasad.K.Basavaraju
16-Apr-14 1:31am
View
No, what plugin are you working with ? Also please close this question by accepting one of the answers above. The solutions above mine are also correct, please accept those too. We can look at your plugins in another thread.
Guruprasad.K.Basavaraju
15-Apr-14 16:46pm
View
These are really good SA.
Guruprasad.K.Basavaraju
15-Apr-14 16:30pm
View
Yes you can, I just posted a common function to use when exporting a table.
Guruprasad.K.Basavaraju
15-Apr-14 16:29pm
View
Day and night working and even better learning..!! Good luck!
Guruprasad.K.Basavaraju
15-Apr-14 15:27pm
View
np, I am from Blore...
Guruprasad.K.Basavaraju
15-Apr-14 14:39pm
View
I have updated the script above..
Guruprasad.K.Basavaraju
15-Apr-14 14:35pm
View
I cannot paste it here for some reason..
Guruprasad.K.Basavaraju
15-Apr-14 14:34pm
View
And about the error. looks like some pasting error.
Change it to below..
<pre>"fnRender": function (oObj) {
return '
' + oObj.aData[0] + '
';
}</pre>
Guruprasad.K.Basavaraju
15-Apr-14 14:32pm
View
Hyperlink isn't static here right ? its actually the ID values.. run this code you will see..
Guruprasad.K.Basavaraju
15-Apr-14 14:32pm
View
add this code above your script tag..
<style>
#myDataTable tr td a
{
text-decoration: none;
}
</style>
Guruprasad.K.Basavaraju
15-Apr-14 14:17pm
View
Action link are usually unlined in browser correct ? :) but yes, you can apply style to remove the underline
Guruprasad.K.Basavaraju
15-Apr-14 14:16pm
View
You can add another dummy column when you return the data and make that an Action link.
Guruprasad.K.Basavaraju
15-Apr-14 14:03pm
View
Try now...
Guruprasad.K.Basavaraju
15-Apr-14 13:54pm
View
You again replied to your own message :) See below for solution
Guruprasad.K.Basavaraju
15-Apr-14 2:07am
View
Sunil, will check on this in the morning.. Please click on reply to my message that will trigger a notification to me. Otherwise I wouldn't know if you commented unless I come to this page again..
Guruprasad.K.Basavaraju
14-Apr-14 13:40pm
View
Just curios, why would you want to edit a link ?
Guruprasad.K.Basavaraju
14-Apr-14 10:41am
View
Are you making this data table editable ?
Guruprasad.K.Basavaraju
12-Apr-14 9:09am
View
Wish there was a way to up vote this reply. Simple and elegant explanation..
Guruprasad.K.Basavaraju
11-Apr-14 12:36pm
View
So what I understand is the Single Market is a single instance of the class and Combined Market is a collection, correct ?
Guruprasad.K.Basavaraju
11-Apr-14 10:43am
View
Sunil, Guess I couldn't get the issue. Could you please explain ?
Guruprasad.K.Basavaraju
10-Apr-14 16:10pm
View
That should work.. thanks and you have a good one too..
If interested in HTML and CSS, I have recently written some articles on the same.. below is the link.
http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=10705317
Guruprasad.K.Basavaraju
10-Apr-14 15:26pm
View
Sunil,
You will need to create a list with the value to insert and value to select. In my example I create a list of string which is just one value in each list element.
Guruprasad.K.Basavaraju
10-Apr-14 10:41am
View
Thats correct,
In my code both the page and the datatable are in the same controller so we dont have to specify it.
Guruprasad.K.Basavaraju
10-Apr-14 10:40am
View
Keerthana, you cannot get the IMEI from a webpage for security reasons..
Guruprasad.K.Basavaraju
9-Apr-14 14:07pm
View
Goodluck.. will look at the other one today.
Guruprasad.K.Basavaraju
9-Apr-14 13:12pm
View
Sunil..
apply both to the Datatable..
like for instance..
var dt = $('#example').dataTable({..bla bla });
dt.edittable({..bla bla });
dt..columnFilter({ sPlaceHolder: "head:before",
aoColumns: [ { type: "text" },
{ type: "date-range" },
{ type: "date-range" }
]
});
Guruprasad.K.Basavaraju
9-Apr-14 12:37pm
View
is this not what you are looking for ?
$(document).ready(function(){
$('#example').dataTable()
.columnFilter({ sPlaceHolder: "head:before",
aoColumns: [ { type: "text" },
{ type: "date-range" },
{ type: "date-range" }
]
});
});
Guruprasad.K.Basavaraju
9-Apr-14 12:30pm
View
Hi Keerthana,
I dont have the full code and may not be able exactly point out the issue for this, please see below for another article on a similar topic.. Are you looking to get this IMEI on a windows App ? where are you using this ?
http://www.codeproject.com/Articles/161389/Windows-Mobile-Programming-Tricks-on-the-NET-Com
Guruprasad.K.Basavaraju
8-Apr-14 16:20pm
View
see below for solution 3.. that solution should work.. accept the answer if it solves your issue.. Thanks!!
Guruprasad.K.Basavaraju
8-Apr-14 15:45pm
View
What exactly is the question here ?
Guruprasad.K.Basavaraju
8-Apr-14 14:26pm
View
Do you mean which event to add this code/logic ?
Guruprasad.K.Basavaraju
8-Apr-14 13:37pm
View
Check the solution below.. thats just a rough idea of how to build a pivot.. modify it according to your table structure
Guruprasad.K.Basavaraju
8-Apr-14 13:20pm
View
could you please post your table structure ? You can use pivoting for this if the marks are stored in rows.
Guruprasad.K.Basavaraju
8-Apr-14 12:57pm
View
Deleted
Ryan.. just added a bit more info above.
Guruprasad.K.Basavaraju
8-Apr-14 12:45pm
View
Deleted
You might want to try passing an XML to your SP
Guruprasad.K.Basavaraju
7-Apr-14 17:10pm
View
That's surprising.. What is the datatype of txtFrmDate ?
Guruprasad.K.Basavaraju
4-Apr-14 13:45pm
View
Dev, could you paste the value of the string "bccAddresses" by putting a break point please ?
Guruprasad.K.Basavaraju
3-Apr-14 19:11pm
View
hmmm.. don't know what to say.. The exact same code of yours works well for me..
I have screenshot but don't know how to send.
Guruprasad.K.Basavaraju
3-Apr-14 18:27pm
View
I guess the problem is not in your query but the C# code where you are adding the variable you are talking about. Can you paste a snippet of that part ?
Guruprasad.K.Basavaraju
3-Apr-14 18:24pm
View
I even tried the exact query of yours with my own table. See below, it works both in SQL and C#
Select
AVG(Weekdiff) as 'Response Time'
from
(select
TicketID,
MEPE_CREATE_DTM,
MEPE_TERM_DT,
DATEDIFF(hour,
MEPE_CREATE_DTM,
MEPE_TERM_DT) as actualhours,
DATEDIFF(day,
MEPE_CREATE_DTM,
MEPE_TERM_DT)actualdays,
DATEDIFF(hour,
MEPE_CREATE_DTM,
MEPE_TERM_DT)-( DATEDIFF(day,
MEPE_CREATE_DTM,
MEPE_TERM_DT)*13)- ((datediff(wk,
MEPE_CREATE_DTM,
MEPE_TERM_DT) * 2) - case
when datepart(dw,
CAST(MEPE_CREATE_DTM AS DATETIME)) = 1 then 1
else 0
end + case
when datepart(dw,
CAST(MEPE_TERM_DT AS DATETIME)) = 1 then 1
else 0
end)*11 as Weekdiff
FROM
(SELECT
[TicketID],
(CASE
WHEN DATEPART(hour,
CAST(MEPE_EFF_DT AS DATETIME)) > '17' then dateadd(hour,
6,
CAST (CAST(DATEPART(year,
(DATEADD (day,
1,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) + '-' + CAST(DATEPART(month,
(DATEADD (day,
1,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) + '-' + CAST(DATEPART(day,
(DATEADD (day,
1,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) AS datetime))
WHEN DATEPART(hour,
CAST(MEPE_EFF_DT AS DATETIME)) < '6' then dateadd(hour,
6,
CAST (CAST(DATEPART(year,
CAST(MEPE_EFF_DT AS DATETIME)) AS varchar(4)) + '-' + CAST(DATEPART(month,
CAST(MEPE_EFF_DT AS DATETIME)) AS varchar(4)) + '-' + CAST(DATEPART(day,
CAST(MEPE_EFF_DT AS DATETIME)) AS varchar(4)) AS datetime))
WHEN DATEPART(dw,
CAST(MEPE_EFF_DT AS DATETIME)) = '7' then dateadd(hour,
6,
CAST (CAST(DATEPART(year,
(DATEADD (day,
2,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) + '-' + CAST(DATEPART(month,
(DATEADD (day,
2,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) + '-' + CAST(DATEPART(day,
(DATEADD (day,
2,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) AS datetime))
WHEN DATEPART(dw,
CAST(MEPE_EFF_DT AS DATETIME)) = '1' then dateadd(hour,
6,
CAST (CAST(DATEPART(year,
(DATEADD (day,
1,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) + '-' + CAST(DATEPART(month,
(DATEADD (day,
1,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) + '-' + CAST(DATEPART(day,
(DATEADD (day,
1,
CAST(MEPE_EFF_DT AS DATETIME)))) AS varchar(4)) AS datetime))
ELSE CAST(MEPE_EFF_DT AS DATETIME)
end) AS MEPE_CREATE_DTM,
[MEPE_TERM_DT]
FROM
SOME_TABLE_OF_MY_OWN
WHERE
DATEDIFF(HOUR,CAST(MEPE_EFF_DT AS DATETIME),[MEPE_TERM_DT]) IS NOT NULL)x
where
DATEPART(WEEK, CAST(MEPE_CREATE_DTM AS DATETIME)) = DATEPART(WEEK, getdate())
)y
Guruprasad.K.Basavaraju
3-Apr-14 18:14pm
View
could you give couple of records from [LFM_Archive].[dbo].[IT_Track] table ?
I tried different DatePart queries from my c# code and it works perfect.
SqlConnection sqlConnection1 = GetConnection();
SqlCommand cmd = new SqlCommand();
SqlDataReader reader;
string str1 = "4/3/2014";
string str2 = "select datepart(dw,CAST('"+ str1 +"' AS DATETIME)) as ss;";
cmd.CommandText = str2 ;
cmd.CommandType = CommandType.Text;
cmd.Connection = sqlConnection1;
// sqlConnection1.Open();
reader = cmd.ExecuteReader();
string ssss = "";
while (reader.Read())
{
ssss = reader[0].ToString();
}
Guruprasad.K.Basavaraju
3-Apr-14 13:00pm
View
What line of this code is throwing the error ? Could you please post the complete error ?
Guruprasad.K.Basavaraju
3-Apr-14 13:00pm
View
Deleted
What line of the code are you getting this error ?
Guruprasad.K.Basavaraju
3-Apr-14 11:20am
View
what happens if you use return View(); instead of return PartialView();
Guruprasad.K.Basavaraju
3-Apr-14 0:31am
View
Samy,
Please give an idea of the model you are working with, paste the model structure. Is it a IEnumerable or a list ?
Guruprasad.K.Basavaraju
2-Apr-14 11:25am
View
What is Model.lstTrxn ? The second argument must be a list.
Guruprasad.K.Basavaraju
2-Apr-14 11:10am
View
Below are two options.
Option 1:
foreach (XElement xE in list1)
{
string DrugName = xE.Element(ns+"DrugName").Value.ToString();
}
Option 2:
string[] drugs = (from el in root.Elements(ns + "PatientDrugDetail").Elements(ns+"DrugName") select el.Value.ToString()).ToArray();
Guruprasad.K.Basavaraju
2-Apr-14 9:06am
View
Guess it was a typo :)
Guruprasad.K.Basavaraju
31-Mar-14 15:40pm
View
Guess, you might have misunderstood the concept of Partial view here or I am mis reading your issue. Could you please post a code snippet ?
Guruprasad.K.Basavaraju
31-Mar-14 13:20pm
View
string str = @"YOUR_XML_STRING";
XElement root= XElement.Parse(str);
Guruprasad.K.Basavaraju
31-Mar-14 11:26am
View
Ah I see what you are saying. I guess we cannot marshall the list type.Below from stack overflow might be a way to solve your problem.
http://stackoverflow.com/questions/5102436/how-to-marshal-collection-in-c-sharp-to-pass-to-native-c-code
Guruprasad.K.Basavaraju
31-Mar-14 10:57am
View
Sorry, :) new to code project.. moved it over to the comment section. Thanks "InsertCleverUserName" :)
Guruprasad.K.Basavaraju
31-Mar-14 10:57am
View
Vedakumar, could you please refine your question? I guess we are getting lost in the long code lines above. Calc on grid is fairly simple , so if you could get the right question posted you will get a quick answer.
-Guru
Show More