What the following Datagrid code will do?

Can anyone explain what the following  code will do?

 
  Dim tc As TemplateColumn
                    tc = New TemplateColumn
                    tc.ItemTemplate = New prj.GridTemplateHandler("ImagePath", "string", "", Me.strServerTimeZone)
                 DataGrid1.Columns.Add(tc)

Open in new window


Does it add any image to the column?  where the image will be picked?
LVL 8
PeteEngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Easwaran ParamasivamCommented:
It creates an ItemTemplate with image.

Look at the method prj.GridTemplateHandler("ImagePath", "string", "", Me.strServerTimeZone). Debug the method to identify where the image is picked from?
BuggyCoderCommented:
It is adding a template column into the gird dynamically, the content of the item template depends on the implementation of GridTemplateHandler.

Share the code for the class and then will be able to tell you...
PeteEngineerAuthor Commented:
I have only the dll where this GridTemplateHandler located ..i dont have project ..

But from somewhere a image is picked that i need to findout
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

PeteEngineerAuthor Commented:
I have right clicked on the method and clicked on "go to definition"

I can see :

Public Class GridTemplateHandler
          Inherits System.Object
     Member of prj
BuggyCoderCommented:
Is it picking the same image everytime, what is this DLL, share the signature of class and methods that your are using....
PeteEngineerAuthor Commented:
But i can tell you the value inside tc.ItemTemplate

using break point
PeteEngineerAuthor Commented:
Yes image is same for all the rows in the same column when there is no data ..(ie a blank one not sure its image)..but image is different when there is data .. its comming from a table
PeteEngineerAuthor Commented:
the value inside that or signature of the method has two things only

1.CustomeCurrencyCulture
2. Hidecurrencysymbol
BuggyCoderCommented:
well where did you get this dll from, i hope there is some documentation for you to refer.
Other option is Use a dis-assembler like ILDASM and get the IL and see if it can give you some hint.....

Some disassemblers even create c# code from Assembled .Net DLL.
PeteEngineerAuthor Commented:
OK i got it :

When i put "test" instead of "" ..i am getting a "test" instead of image.

  tc.ItemTemplate = New prj.GridTemplateHandler("ImagePath", "string", "test", Me.strServerTimeZone)

So above function using a parameter of image location at the place of "test"

right now my problem is when i get i give a blank as this function parameter ..instead of showing blank in the rows of that column..its showing an error message ..i will post that error in the next post
PeteEngineerAuthor Commented:
"Image path is neither a datacolumn or a datarelation for table Table"

Why the above message is comming instead of blank rows in that column?
BuggyCoderCommented:
Maybe this method is implemented in such a way that if image parameter is null or empty, it will return an exception.

something like:-

if(string.IsNullOrEmpty(val))
{
throw new InvalidOperationException("This parameter cannot be empty");
}
PeteEngineerAuthor Commented:
Where i need to put the above code?

I need to make blanks in the rows ..how the above code help me in making it ?
BuggyCoderCommented:
No Where, i was just telling you that this might be the code in the method in your dll because of which it throws error
PeteEngineerAuthor Commented:
Alright i am gonna do this , may be this be a solution:  

 tc.ItemTemplate = New prj.GridTemplateHandler("ImagePath", "string", " ", Me.strServerTimeZone)


An extra space for double quotations

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PeteEngineerAuthor Commented:
Alright it fixed the issue ,,, so thanks for helping ...Yipieeeeeeee!!
BuggyCoderCommented:
Please rate and close this question.

Happy programming
:-)
PeteEngineerAuthor Commented:
Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.