How to call a method?

Posted by Laghaterohan under Regular Expressions on 3/18/2011 | Points: 10 | Views : 1198 | Status : [Member] | Replies : 1
Hello,

I have gridview which displays several records. However now i want to differenciate those records in section A and Section B.
How can i do it in the same Gridview...? EX...currently my grid displays 6 records...when the user views the grid i want the user to
recognize which record belongs to Section A and which to Section B ...like
Section A
--------------
XYZ ABC Edit

Section B
--------------
LMN YUT Edit


Else,

I am planing to take another grid and display the records of Section B in that grid. However, i want to use the same code that i have writeen
on the Edit event of Section A grid...so instead of rewriting the code again sepeartely for Section B grid edit event...can i call the code written under section A grid edit event from section b grid edit event??

Please help!

Best Regards,
Rohan Laghate



Responses

Posted by: Raja on: 3/19/2011 [Member] Starter | Points: 25

Up
0
Down
I think you can do this easily.

Just create two different edit event for both the gridview separately but keep the code inside GridView to a private method and call that private method from both the Edit event methods so your code will be one and will be called from two different method.

You can also keep a nested GridView and do this.

Thanks

Regards,
Raja, USA

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response